I'm trying to complete a school project where I create a maths quiz that randomly generates questions. You have to login with a name and classroom your in. All my code works apart from the section of code where I am trying to use a range for my class (Between class 1 and 3). It keeps popping up with an error saying:
TypeError: '<=' not supported between instances of 'int' and 'str'
while True:
classCode=input("What class are you in? 1, 2, or 3? ")
if 1 <= classCode <= 3:
break
else:
print("That isn't a class. Please try again.")
continue
Anyone know whats wrong with this code? This is my first question so if it's not in the right format I apologize.