-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday7(if-elif).py
More file actions
34 lines (28 loc) · 803 Bytes
/
day7(if-elif).py
File metadata and controls
34 lines (28 loc) · 803 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
# a=int(input("Enter the age: "))
# if(a>18):
# print("You can drive")
# else:
# print("you cannot drive") #the space before print is the indentataion
# print("Wowwww this line always prints as it is not in loop")
num = int(input("Enter the value of num: "))
if (num < 0):
print("Number is negative.")
elif (num == 0):
print("Number is Zero.")
elif (num == 999):
print("Number is Special.")
else:
print("Number is positive.")
print("I am happy now")
num = int(input("enter the number:"))
if (num < 0):
print("Number is negative.")
elif (num > 0):
if (num <= 10):
print("Number is between 1-10")
elif (num > 10 and num <= 20):
print("Number is between 11-20")
else:
print("Number is greater than 20")
else:
print("Number is zero")