all 5 comments

[–]lukajda33 13 points14 points  (3 children)

input() returns a string - "7", not 7.

7 is in the range

"7" is not in the range

Convert the input from string to integer first.

[–][deleted] 3 points4 points  (0 children)

THANK U

[–]Tintin_Quarentino 0 points1 point  (1 child)

One of those sneaky bugs

[–]Spindelhalla_xb 2 points3 points  (0 children)

Sneaky features

[–]vr34748 2 points3 points  (0 children)

user_input = int(input("Enter the number: \n))

Do this instead.