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 Input

Dave Hanna
PLUS
Dave Hanna
Courses Plus Student 2,969 Points

I need age to be an integer. What do I need to add? This was my answer age = int((input("What is your age? "))

I need age to be an integer. What do I need to add?

This was my answer and it was returned incorrect. Any suggestions?

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

Josh Kilen
Josh Kilen
13,089 Points

Uh... the answer is in the headline. Input in Python 3 converts everything to a string so you need to add the int function to make it into an integer if that that's your thing. So, you would need to make it age = int((input("What's is your age? ")) to get an integer for the age.

1 Answer

The reason it's not passing is because you are putting in an extra (. Take that out and it will pass.