+ 2

Correct my if else code statement code

guessing_number =100 user_type = int(input("guess a number")) if user_type == guessing_number: print("you win") else: if user_type < guessing_number: print("too low") else : print("too high")

26th Sep 2020, 5:21 AM
Round Up Kid
Round Up Kid - avatar
1 Answer
+ 4
guessing_number =100 user_type = int(input("guess a number")) if user_type == guessing_number: print("you win") else: if user_type < guessing_number: print("too low") else : print("too high") Indentation is very important in python make sure that the if and else you are connecting have the same indentation space (aligned with eachother)
26th Sep 2020, 5:23 AM
Odyel
Odyel - avatar