generated from mwc/lab_weather
	Made function to tally favorite colors.
This commit is contained in:
		@@ -91,7 +91,14 @@ def get_color_dict(people):
 | 
				
			|||||||
            "orange": 1,
 | 
					            "orange": 1,
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    raise NotImplementedError()
 | 
					    color_count = dict()
 | 
				
			||||||
 | 
					    for person in people:
 | 
				
			||||||
 | 
					        for color in person["favorite_colors"]:
 | 
				
			||||||
 | 
					            if color not in color_count:
 | 
				
			||||||
 | 
					                color_count[color] = 0
 | 
				
			||||||
 | 
					            color_count[color] += 1
 | 
				
			||||||
 | 
					    return color_count
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user