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 trial

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,365 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

I agree....stupid question