Question: [ Python ] Define a function called print _ menu that will print the daily menu. It should be reusable enough to print any of

[Python] Define a function called print_menu that will print the daily menu. It should be reusable enough to print any of daily menus when called--not just Monday's.
FIrst:
Only Monday Menu is defined so far. The menu of five cookieswill change daily.
monday_menu ={'choccy chipper': {'price': 2.50, 'stock': 120},
'fudgy pudgy': {'price': 2.50, 'stock': 120},
'key lime crime': {'price': 4.25, 'stock': 96},
'salty sailor': {'price': 4.40, 'stock': 60},
'blueberry blooper': {'price': 5.00, 'stock': 60}}
Second:
We have created a for loop iterate over the monday_menu dictionary to print each cookie and it's price.
for x, y in monday_menu.items():
print(f"{x}: ${y['price']}")
Third:
We are allowed to call today's date by enter the code:
datetime.date.today()
What element from the above tasks did I have to modify for my function to be reusable across a variety of daily menus?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!