-
Notifications
You must be signed in to change notification settings - Fork 11
/
pizza.py
40 lines (28 loc) · 1.03 KB
/
pizza.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#~ pizza = {
#~ 'crust': 'thick',
#~ 'toppings': ['mushroom', 'extra cheese'],
#~ }
#~ print("You ordered a " + pizza['crust'] + "-crust pizza " +
#~ "with the following toppings:")
#~ for topping in pizza['toppings']:
#~ print("\t" + topping)
#~ def make_pizza(*toppings):
#~ """Print the list of toppings that have been requested."""
#~ print(toppings)
#~ make_pizza('pepperoni')
#~ make_pizza('mushroom', 'green peppers', 'extra cheese')
#~ def make_pizza(*toppings):
#~ """Summarize the pizza we are about to make."""
#~ print("\nMaking a pizza with the following toppings:")
#~ for topping in toppings:
#~ print("- " + topping)
#~ make_pizza('pepperoni')
#~ make_pizza('mushroom', 'green peppers', 'extra cheese')
def make_pizza(size, *toppings):
"""Summarize the pizza we are about to make."""
print("\nMaking a " + str(size) +
"-inch pizza with the following toppings: ")
for topping in toppings:
print("- " + topping)
#~ make_pizza(16, 'pepperoni')
#~ make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')