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 (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