Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (2015) Logic in Python Use input()

What is wrong below? :o

Simple one this time. Make a variable named age that is assigned to an input() call. Give your input() a prompt of "What is your age?". You might need to add a space in there, though.

"Bummer! Add in a trailing space."

age.py
age = input("What is your age?")

7 Answers

Grigorij Schleifer
Grigorij Schleifer
10,364 Points

Hi Alex,

just add a sspace between your question mark and end quotes :)

Grigorij

age = input("What is your age? ")

this works i just had one little space more than you after the question mark this is killing me XD

I don't understand why, but this code didn't work for some reason: age = input("What's your age? ")

Alexander Schieving
Alexander Schieving
3,800 Points

Same here. In the console it works not in age.py. Very frustating

Patric Daniel Pförtner
Patric Daniel Pförtner
1,542 Points

Hi Alex,

You are very close to the answer, here is how I did it:

age = input("What is your age? ")
# Don´t forget to place a freespace after the Questionmark.

Why are you learning Python? Maybe we have the same aims! I am learning it to bring my Start UP www.wolf-gate.com to the next level. Thank´s to Kenneth Love it´s easily possible :)

Now its working fine..Thank u Grigorij

Ben Johnson
Ben Johnson
6,005 Points

I agree....stupid question