Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if ,elif, else in python

# if,elif,else in statement.
m=1
n=2
p=3
if n<m:
    print('n is greater than m')#(n>m,hence not satisfied)
elif p!=m+n:
    print('p is not equal to  sum of m and n')#(p==m+n, hence not satisfied)
else:
    print('not satisfied')
output:
not satisfied
................................................................................
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
2+9 =