if statements in python 3 part-7

Published: 05 January 2018
on channel: Cook The Code
3
0

What are if...else statement in Python?
Decision making is required when we want to execute a code only if a certain condition is satisfied.

example:-
If the number is positive, we print an appropriate message

num = 3
if num greater then 0:
print(num, "is a positive number.")
print("This is always printed.")

num = -1
if num greater then 0:
print(num, "is a positive number.")
print("This is also always printed.")

website:-https://coderworld109.blogspot.com/


Watch video if statements in python 3 part-7 online without registration, duration hours minute second in high quality. This video was added by user Cook The Code 05 January 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3 once and liked it 0 people.