-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice9.py
More file actions
22 lines (18 loc) · 738 Bytes
/
practice9.py
File metadata and controls
22 lines (18 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
Try It Yourse lf
4-13. Buffet: A buffet-style restaurant offers only five basic foods. Think of five
simple foods, and store them in a tuple.
Use a for loop to print each food the restaurant offers.
The restaurant changes its menu, replacing two of the items with different
foods. Add a block of code that rewrites the tuple, and then use a for
loop to print each of the items on the revised menu.
"""
#4-13
print("Main Menu")
basic_foods = ('Pancakes','Hamburger','Pan Sauce','Omelets','Scrambled Eggs') #tuple definition
for food in basic_foods:
print(food)
basic_foods = ('Pizza','Hamburger','Pan Sauce','Cheese Burguer','Scrambled Eggs') #re definition tuple
print("New Menu")
for rfood in basic_foods:
print(rfood)