Home / Learn / Python / If Statements / Quiz
x = 3 if x > 4: print("x is greater than 4") elif x < 4: print("x is less than 4") else: print("x is equal to 4")
x = "Hello" if x == "Hello": print("x is equal to 'Hello'") else: print("x is not equal to 'Hello'")
x = 4 if x > 4: print("x is greater than 4") elif x < 4: print("x is less than 4") else: print("x is equal to 4")
x = 5 if x < 4: print("x is greater than 4") else: print("x is not greater than 4")
x = 5 if x > 4: print("x is greater than 4") elif x < 4: print("x is less than 4") else: print("x is equal to 4")