subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
You know the right answer?
Please fill in the blank so that the following code successfully iterates through the data stored in...
Questions
question
Biology, 05.09.2019 22:30