0

Code always goes to the else statement regardless of number 1, 2, or 3

print("Finally learning about input in order to get info from the user")
numbers1 = input("Please Choose a Number from 1 to 3: ")
print(numbers1)
if numbers1 == 1:
    print("This number would result in failure on future games")
elif numbers1 == 2:
    print("This would be a success in any future game created by user")
elif numbers1 == 3:
    print("Massive Faulure")
else:
    print("Game Will Result IN Failure")
John Kugelman
  • 349,597
  • 67
  • 533
  • 578
RedRubix
  • 13
  • 1

1 Answers1

1

any input from keyboard is taken is as a string. Just convert it before you compare it to an integer...

numbers1 = int(numbers1)
....
AirSquid
  • 10,214
  • 2
  • 7
  • 31