Pythonexperiment No.3
Pythonexperiment No.3
1) Python If Statement:
Input:
number = 10
# check if a number is greater than 0
if number > 0:
print('number is positive')
Output:
number is positive
for i in range(5):
print(i)
Output:
0
1
2
3
4
Input:
Output:
cat 3
window 6
defenestrate 12
Input:
for i in range(10):
if i ==4:
break
print(i)
Output:
0
1
2
3
Input:
Input:
Output: