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!

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 Meet Python Variables

Why do number don't use quotes ?

Numbers don't use quotes as other words do to form a string

2 Answers

Hey rajesh. This might not be the answer you are looking for. But I will try a simple approach as I learned at first. If you put number in quotes that is treated as string "35" and to tell the compiler and process is as number you will use 35. so 35 and "35" and not equal, one is number and one is string. Anything used inside the quotes is string or character or sentence. anything you need to do calculations on is number and goes without quotes.

i will try a different approach to explain it the console reads information about variables using their data types and each data type has a different type of syntax for example in this case when creating a string variable we need to surround the value of the variable using quotes however for number data types or integers we do not use quotes