Question: Need help with this test code: Solution Specifications Your solution to this problem must meet the following criteria. 1. You must define a class FoodLog
Need help with this

test code:

Solution Specifications Your solution to this problem must meet the following criteria. 1. You must define a class FoodLog in the file food_log.py with a dictionary attribute called food_log. 2. The class must include an instance method called add_food which takes two parameters. - a string for the name of food - an integer for the number of calories 3. The instance method add_food will add food to the dictionary with the key being the name and the value being the calories import food_log \# test the class thanksgiving_meal = food_log. FoodLog() thanksgiving meal.add_food ("Mashed Potato", 206) thanksgiving meal.add_food ("Stuffing", 150) print(thanksgiving meal.food_log)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
