-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinal_project.py
More file actions
43 lines (33 loc) · 909 Bytes
/
final_project.py
File metadata and controls
43 lines (33 loc) · 909 Bytes
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
39
40
41
def greet_user(name,age):
print(f"\nhello{name},welcome to Amon's minishop!")
if age<10:
print("you qualify for a 10% student discount")
else:
print("enjoy shopping at Amon's minishop")
def items_available(the_items_available):
items={
1.("bread",50),
2.("milk",40),
3.("sugar",100),
}
def show_price(choice):
if choice==1:
return 50
elif choice==2:
return 40
elif choice==3:
return 100
else:
return 0
name=input("what is your name?")
age=int(input("how old are you?"))
choice=input("pick a number (1-3):")
def get_price(choice):
if"price"==0:
print("sorry,that is not on the menu.")
else:
if age<10:
print("you qualify for a 10% discount.")
price="price"-10
def print_final_price(get_price):
print("thank you for shopping,come again")