Python Tutorial for Beginners 11 - Python IF ELSE Statements

preview_player
Показать описание
In this Video I am going to show How to use IF ELSE conditional statements in python. The if statement evaluates a Boolean condition, and if it is True, performs the indented statements(or a block or code); but if the test is False, it does nothing. The if statement can have an optional else part which will be performed if the test result is False.
If you if condition expression contains logical operators then,
In (A and B), if A is false, then so is the expression, and there is no need to evaluate B
In (A or B), if A is true, then so is the expression, and there is no need to evaluate B

#PythonTutorialforBeginners #ProgrammingKnowledge #LearnPython #PythonCourse

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

These tutorials are helping me soooo much, thank you so much for them!

danieloliveira
Автор

I asked you on previous video also, please do reply.. will you be covering tkinter and matplotlib modules of python in this series ?

ankitdubey
Автор

Hi, what if x =, zero?? I found out in the next chapter.x = 0
if x == 100:
print('x is = ')
print(x)
if x>0:
print('x is positive')
elif x==0:
print("x is zero")
else:
print('x is negative')
print ('finish')

hanspijpers
Автор

if indent works as bracket then why does one need the colon?

HR-ydib
Автор

Anaconda or pycharm which is easy and good for python

jatinsharma