Answers for "if, elif and else in python"

3

how to use if else in python

print("Welcome to Rolercoster rider")
print()
#taking input of your hight
Your_hight = int(input("What is Your hight:- "))
#if condition 
if Your_hight >= 120:
    print("You are good to go to the roller coster")
else:
    print("Grow taller to go to the rolercoster")
Posted by: Guest on July-31-2021
0

python if elif

2 7 1
Posted by: Guest on August-25-2021
-1

python else elif

>>> a = 5
>>> if a > 5:
...     a = a + 1
... elif a == 5:
...     a = a + 1000
... else:
...     a = a - 1
... 
>>> a
1005
Posted by: Guest on February-19-2020

Python Answers by Framework

Browse Popular Code Answers by Language