Computers and Technology

Please fill in the blank so that the following code successfully iterates through the data stored in "makeup_products" and extracts the total number of shades for items that are meant just for "Lips", storing the total in a variable called "total_count_lip_shades".I tried if(item[product]["Location"] == "Lip"): itdidn't work, please help!makeup_products = {"Products": [{"Primer": {"Shades": 15,"Styles": 5,"Location": "Face"}},{"Lipstick": {"Shades": 48,"Styles": 3,"Location": "Lips"}},{"Lip liner": {"Shades": 32,"Styles": 4,"Location": "Lips"}},{"Blush": {"Shades": 13,"Styles": 2,"Location": "Face"}},{"Eye Liner": {"Shades": 14,"Styles": 7,"Location": "Eye"}},{"Travel Makeup Kit": {"Shades": "N/A","Styles": 3,"Location": "Face, Lips, Eye"}}] }total_count_lip_shades = 0for item in makeup_products["Products"]:for product in item:# your line hereshade_count = item[product]["Shades"]total_count_ lip_shades += shade_count

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, crimhill
When is it appropriate to use an absolute reference
Answers: 1
image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 24.06.2019 15:00, marelinatalia2000
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
image
Computers and Technology, 25.06.2019 04:30, almaromeroo13
Consider a list of full names formatted “firstname lastname”, like ["jules verne", "alexandre dumas", "maurice druon"]. write a list comprehension that produces a list with the full names in the format “lastname, firstname”. the resulting list should look like ['verne, jules', 'dumas, alexandre', 'druon, maurice']. the simplest solution may involve a nested comprehension: [ …. for … in [ … for … in … ]].
Answers: 3
Do you know the correct answer?
Please fill in the blank so that the following code successfully iterates through the data stored in...

Questions in other subjects:

Konu
Mathematics, 04.02.2020 01:43