I'm learning on Pythong 3.9.2 and in the self-taught programmer book from 2022 the code on the bottom of page 67 does trigger the question about age but it doesn't print the result. Here is the code:
age = input ("Enter your age:")
int_age = int(age)
if int_age <21:
print ("Dude you're young")
else:
print ("Just the right age")
I tried a couple of times and even taking the second line out or replacing in line 3 int_age with int(age) but still nothing. I would greatly appreciate any help :)
Hey there,
I'm learning on Pythong 3.9.2 and in the self-taught programmer book from 2022 the code on the bottom of page 67 does trigger the question about age but it doesn't print the result. Here is the code:
age = input ("Enter your age:") int_age = int(age) if int_age <21: print ("Dude you're young") else: print ("Just the right age")
I tried a couple of times and even taking the second line out or replacing in line 3 int_age with int(age) but still nothing. I would greatly appreciate any help :)