Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialconnor hoare
7,933 PointsCan any one help with this please? Input() code challenge for Python?
I cant seem to work this out? What am i doing wrong?
age = input("What is your age?")
Stephen McBride
7,769 PointsHey David,
I just thought I would add that in Python the use of a semi colon is not needed to terminate a line of code.
It is used more as a separator so there can be multiple statements on the same line.
an example would be: print x; print y; print z
The problem is just that there is no space between ? and ". Hope that helps!
3 Answers
Andrey Misikhin
16,529 PointsIt works. You must execute it from console with command "python age.py".
Stephen McBride
7,769 PointsHi Connor
I think your problem is that you've just not added a space at the end.
age = input("What age are you? ")
Everything else looks correct though.
Indy Subasic
5,401 PointsConnor, not sure if I am seeing acurately, however it seems that you have a space between input and (
David Dooley
3,028 PointsDavid Dooley
3,028 PointsTry this, notice the semi colon
age = input("What is your age? ");