Hello friends, lets learn about the if structure in Python3.
The 'if' is same as in C, if the condition is true then the code is executed or else it is not executed.
Check out this program:
The 'if' is same as in C, if the condition is true then the code is executed or else it is not executed.
Check out this program:
x = 5
y = 8
z = 5
if x < y:
print ('x is less than y ')
if z < y > x:
print ('y is greater than x and greater to z')
if z == y:
print ('z is equal to y')
Output |