-
Notifications
You must be signed in to change notification settings - Fork 0
/
if-else, elif condition.py
50 lines (39 loc) · 1019 Bytes
/
if-else, elif condition.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
43
44
45
46
47
48
49
50
# var1 = 73
# var2 = int(input("Enter your number:\n"))
# # if-else ladder
# if var2>var1:
# print("Greater")
# elif var2==var1:
# print("Equal")
# else:
# print("Smaller")
# # "in" and "not in" key in list
# ls = [3,7,10]
# print(7 in ls)
# if 3 in ls:
# print("present")
# else:
# print("not present")
# print(7 not in ls)
# if 73 not in ls:
# print("correct")
# else:
# print("wrong")
########################## QUIZE TIME ###########################
# make a programe we checks whelter the person is able to drive or not
# age = int(input("Enter your age : "))
# if age>18:
# print("You can drive")
# elif age==18:
# print("You have to come for physical examination")
# else:
# print("You can't drive")
######################### Another Quize #######################
print("Are you alegibal to run pc")
age = int(input("Enter your age : "))
if age<7:
print("You should not use pc")
elif age>125:
print("write correct age")
else:
print("You can use pc")