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

help please

I typed 22

int 22

int -

2 Answers

Tobias Helmrich
Tobias Helmrich
31,603 Points

Hey Daniel,

the quiz wants to know how you turn the input value into an integer. To do that you use the int function with the input as an argument. So the only thing you have to write here is int .

I hope that helps! :)

Matt Nickele
Matt Nickele
468 Points

Hey Daniel

so int is used to change numbers in a string to be recognized by python as integers. so since 22 is already and integer int is not needed. However if I for example have my_string = "22" and I want to make that an integer I can use int to do this my_number = int(my_string), will make the 22 an int. You do need parentheses you can not just say int 22. 22 will likely also need a variable to hold it.