1print("Welcome to Rolercoster rider")
2print()
3#taking input of your hight
4Your_hight = int(input("What is Your hight:- "))
5#if condition
6if Your_hight >= 120:
7 print("You are good to go to the roller coster")
8else:
9 print("Grow taller to go to the rolercoster")
1usrinput = input(">> ")
2if usrinput == "Hello":
3 print("Hi")
4elif usrinput == "Bye":
5 print("Bye")
6else:
7 print("Okay...?")
8
1# IF ELSE ELIF
2
3print('What is age?')
4age = int(input('number:')) # user gives number as input
5if age > 18:
6 print('go ahead drive')
7elif age == 18:
8 print('come personaly for test')
9else:
10 print('still underage')
11
1#if else conditions in python
2a = "if else conditions are inportant"
3if "else" in a:
4 print("Word is in a")
5else:
6 print("word is not in a")
7
1# IF ELSE ELIF
2age=int(input("Enter your age:"))
3if age<=18:
4 print("sorry your are not eligible for vote")
5elif age>=18:
6 print("u are eligible for vote")
7else:
8 print("in some how the previou's condition fails else part will run")