calthoff / self_taught

This repository contains the exercises for "The Self-Taught Programmer: The Definitive Guide to Programming Professionally."
http://theselftaughtprogrammer.io
272 stars 226 forks source link

Code on page 67 doesn't work #42

Closed OliverPaw closed 1 year ago

OliverPaw commented 1 year ago

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 :)