Python Statements
Decision Making Statement in Python :
if , else , elif are use to make the decision in python.
We can simply put it as ;
if(my_marks_out_of_ten < 6):
print("I will not get chocolate's")
elif( 6 < my_marks_out_of_ten < 10 ):
print("I will get 2 chocolate's")
else:
print("I will get lot's of chocolate's")
Now lets Check out syntax of :
if ( expression ) :
statement_1
else :
statement_2
else:
print("I will get lot's of chocolate's")
Now lets Check out syntax of :
(i) if else :
if ( expression ) :
statement_1
else :
statement_2
if ( expression_1 ) :
statement_1
elif( expression_2 ):
statement_2
.
.
.
else :
statement_n
Here is the video reference for you to understand this topic :
Hey guys enjoying our content?... please leave a comment below & don't forget to subscribe our blogging site & the youtube channel so you do not miss out any of the tech knowledge.
No comments:
No Spamming and No Offensive Language