InfinityCodeX

Unlock the power of Python, Data Science, Machine Learning, and Deep Learning with our comprehensive guides! Whether you're a beginner eager to dive into AI or an experienced professional looking to sharpen your skills, our blog offers easy-to-follow tutorials, insightful tips, and expert advice to fuel your AI career. Dive in today and start mastering the cutting-edge technologies shaping the future!

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 :


(i) if else :



if ( expression ) :
    statement_1
else :
    statement_2

Here's the flow chart of this .



(ii) if elif else :




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

Powered by Blogger.