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
1if expression1:
2 statement(s)
3elif expression2:
4 statement(s)
5elif expression3:
6 statement(s)
7else:
8 statement(s)
9
1word = input('Word: ') # This will ask you to print a word
2
3if word == 'hello': # <- If your response is: 'hello'
4 print('world') # <- It will output: 'world'
5
6elif word == 'world': # If the response is: 'world'
7 print("Hey, that's my line >:(") # It will print this
8else:
9 print("Hey buster you gonna say hello or not?")
10# If sombody prints ANYTHING ELSE other than 'hello' or 'world'
11# It will output that print statment above!
12
13#Hope this helped you!
1name = input("What's your name? \n") # Asks user for a name
2
3# Following if order:
4# first program checks if the if is true
5# next program lists down the elifs (or else ifs) in the order
6# in which they are listed
7# Lastly, if there is an else, program does whatever is inside
8# of there.
9
10if name == "Aguy12": # First checks if they answered "Aguy12"
11 print("Wait a second...")
12elif name == "Aguy11": # Then checks if they answered with "Aguy11"*
13 print("Now that's definitely not true")
14else: # If none of those are true greets the person accordingly
15 print(f"Hello, {name}!")
16
17# * ONLY IF THE IF STATEMENT IS NOT TRUE
18
19