forked from ThinkBig-Data/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
condition stattement.py
53 lines (40 loc) · 925 Bytes
/
condition stattement.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
51
52
53
condition1 = True
x = 'python is easy' if condition1 else 'you need to work hard'
print(x)
#######################################
a=3
if a==0:
print('zero true')
elif False:
print('elif 1 true.')
elif False:
print('elif 2 true.')
elif True:
print('elif 3 true.')
elif False:
print('elif 4 true.')
else:
print('neither true')
######################################
m=42
k=72
if m<=k:
print(f'{m}: is greater than {k}')
else:
print(f'{m}: is lesser than {k}')
l = ('mukul', 'meenashki', 'reet', 'devansh', 'atul')
p = 'mukul'
for i in l:
print(i)
if p == l[0]:
print("codition true")
else:
print('false')
###################################33
q = 5
w = 3
print(f'addition of {q} and {w} is {q+w}')
print(f'substraction of {q} and {w} is {q-w}')
print(f'multi of {q} and {w} is {q*w}')
print(f'division of {q} and {w} is {q/w}')
print(f'poewr of {q} and {w} is {q**w}')