-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif_1.py
More file actions
38 lines (35 loc) · 744 Bytes
/
if_1.py
File metadata and controls
38 lines (35 loc) · 744 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
age = 17
if age >= 18:
print("You are very old to vote!!!")
print("Have you registered to vot yet?")
else:
age <= 18
print("Sorry you are too young for a vote!")
print("Please register to vote as soon as you turn 18")
age = 12
if age < 4:
print("You admission cost $0.")
elif age < 18:
print("You admission cost is $5.")
else:
print("You admission cost is $10.")
age = 12
if age < 4:
price = 0
elif age < 18:
price = 5
elif age < 65:
price = 10
else:
price = 5
print("You admission cost is $" + str(price) + ".")
age = 12
if age < 4:
price = 0
elif age < 18:
price = 5
elif age < 65:
price = 10
elif age >= 65:
price = 5
print("You admission cost is $" + str(price) + ".")