As said in the title, I am trying to restrict certain stuff on my gui based on age. I put:
def age_limit():
age = spinbox.get()
if age < "10":
response.config(text="you're too young to be on here, kid.")
else:
response.config(text= "Go Ahead")
for 0 and 1, it says it correctly. However, when it hits 2, it says continue. I’ve tried making a variable equal to 10, but it just does the same. I’ve tried making it 100 to see if that was the problem, it was the same output. I was expecting it to say “your too young” up to 10, then say “Continue.” for 11+.
New contributor
Adriana Mcgonigal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.