-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path2- Course discount.py
42 lines (26 loc) · 1.16 KB
/
2- Course discount.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
39
40
41
42
userName = input("What is your name? ").strip().capitalize()
userCountry = input("Where are you from? ").strip().lower()
student = input("Are you a student? ").strip().lower()
courseName = "Python Course"
coursePrice = 100
countries_1 = ["egypt", "turkey", "syria", "palastine", "tunis", "libya"]
countries_2 = ["ksa", "qatar", "kuwait", "Bahrain", "saudi arabia"]
countries_3 = ["usa", "italy", "barazil", "england", "germany"]
print(f"Hi {userName}!")
if userCountry in countries_1:
if student == "yes":
print(f'The course "{courseName}" price is: ${coursePrice - 90}')
else:
print(f'The course "{courseName}" price is: ${coursePrice - 80}')
elif userCountry in countries_2:
if student == "yes":
print(f'The course "{courseName}" price is: ${coursePrice - 70}')
else:
print(f'The course "{courseName}" price is: ${coursePrice - 60}')
elif userCountry in countries_3:
print(f'The course "{courseName}" price is: ${coursePrice - 0}')
else:
if student == "yes":
print(f'The course "{courseName}" price is: ${coursePrice - 40}')
else:
print(f'The course "{courseName}" price is: ${coursePrice - 30}')