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 (Retired) Things That Count Things That Count

help the newbie

Create a variable named age that contains your age

days_alive.py
age = input('21')
print('age')

2 Answers

Jeffrey Ruder
Jeffrey Ruder
6,408 Points

Hello,

I haven't done this exact challenge, but the input() function in Python is used when you want the user to enter something. Also, to print a variable, you don't need quotes around it.

If I just wanted to make a variable that contained my age and print it, I would do:

age = 21
print(age)

Thanks!!

Anthony Wijaya
Anthony Wijaya
3,215 Points

Not sure what the problem is? Though I think the task is just for you to declare a variable called age.

age = 20 //like this