In this exercise, you will create a Python script that represents a restaurant menu using a dictionary. Here's how the program should work: 1. Create a dictionary called menu that represents the restaurant menu. Each key in the dictionary should be a string representing a menu item, and each value should be a float representing the price of the item. Menu: - Burger: $10.99 - Fries: $3.99 - Salad: $7.99 - Milkshake: $5.99 2. Print out the menu using a for loop. The output should include the name of each item and its price. 3. Prompt the user to enter the name of a menu item they would like to order. 4. Check if the item exists in the menu. If it does, print out the price of the item. If it does not, print out a message indicating that the item is not on the menu.
In this exercise, you will create a Python script that represents a restaurant menu using a dictionary. Here's how the program should work:
1. Create a dictionary called menu that represents the restaurant menu. Each key in the dictionary should be a string representing a menu item, and each value should be a float representing the price of the item. Menu: - Burger: $10.99 - Fries: $3.99 - Salad: $7.99 - Milkshake: $5.99
2. Print out the menu using a for loop. The output should include the name of each item and its price.
3. Prompt the user to enter the name of a menu item they would like to order.
4. Check if the item exists in the menu. If it does, print out the price of the item. If it does not, print out a message indicating that the item is not on the menu.

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images









