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 trialRoman Shabel'nik
132 Pointshelp the newbie
Create a variable named age that contains your age
age = input('21')
print('age')
2 Answers
Jeffrey Ruder
6,408 PointsHello,
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)
Anthony Wijaya
3,215 PointsNot sure what the problem is? Though I think the task is just for you to declare a variable called age.
age = 20 //like this
Roman Shabel'nik
132 PointsRoman Shabel'nik
132 PointsThanks!!