Introduction:
The if statement is the simplest form. It takes a condition and evaluates it to either True or False.If the condition is True, then the True block of code will be executed, and if the condition is False, then the block of code is skipped, and The controller moves to the next line
Examples:
Examples1:
- a=10
- b=20
- if a<b:
- print("yes a is less then b",'A=',a,'B=',b)
Examples2:
- a=input("please enter any number")
- b=input("please enter any number")
- if a==b:
- print("yes a==b")
- print(a,b)
Examples3:
- a=input("please tell your mobile bettery %")
- if int(a)>=80:
- print("The your cell is charged 80% ")


0 Comments