Enter your name and EID here
This homework is due on Mar. 30, 2020 at 12:00pm. Please submit as a PDF file on Canvas. Before submission, please re-run all cells by clicking "Kernel" and selecting "Restart & Run All."
Problem 1 (5 pts): Create a list with the names of your favorite foods. Your list should contain at least 5 different kinds of food. Then, complete the following steps using python. Each step should be completed in a different cell and your results should be printed with print()
.
.sort()
.len()
..remove()
.append()
# Your code here
Problem 2 (5 pts): Now imagine that you have spent a week eating only your favorite foods listed in Problem 1. Create a dictionary that contains the names of the food as keys & counts for each time you ate that food as values. For example, if you ate tacos 12 times, the key would be "tacos" and the value would be 12. The counts should just be made-up counts. Then, complete the following steps using python. Each step should be completed in a different cell and your results should be printed with print()
.
for
loop..keys()
and .values()
.# Your code here