-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIf elif and else.py
More file actions
90 lines (49 loc) · 1.3 KB
/
If elif and else.py
File metadata and controls
90 lines (49 loc) · 1.3 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env python
# coding: utf-8
# In[1]:
# if some_condition :
# #execute some code
# elif some_condition :
# #execute some code
# else :
# #execute some code
# In[7]:
hungry = True
if hungry :
print('get me food')
else:
print('I am not hungry')
# In[9]:
hungry = False
if hungry :
print('get me food')
else:
print('I am not hungry')
# In[11]:
amount = 5000
if amount < 5000:
print('sorry your balance is much not enoguh for this transaction')
elif amount == 5000:
print('transaction succesffull but your account will be 0 after transcation')
# this condition is when amount is > 5000
else :
print('transaction succesffull')
# In[12]:
amount = 6000
if amount < 5000:
print('sorry your balance is much not enoguh for this transaction')
elif amount == 5000:
print('transaction succesffull but your account will be 0 after transcation')
# this condition is when amount is > 5000
else :
print('transaction succesffull')
# In[13]:
amount = 3000
if amount < 5000:
print('sorry your balance is much not enoguh for this transaction')
elif amount == 5000:
print('transaction succesffull but your account will be 0 after transcation')
# this condition is when amount is > 5000
else :
print('transaction succesffull')
# In[ ]: