If–Elif–Else Statements
if
if … else
if condition1: # runs if condition1 is True elif condition2: # runs if condition2 is True else: # runs if none above are True
score = int(input("Enter your test score: ")) if score >= 90: print("A") elif score >= 80: print("B") elif score >= 70: print("C") else: print("Below C")
What does this print if x = 15?
x = 15 if x > 20: print("Big") elif x > 10: print("Medium") else: print("Small")
Ask the user for the temperature: