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) Python for Beginners Second Quiz

Kevin Melendez
Kevin Melendez
316 Points

Variables have to have a type declared before you can put a value into them? Confused with difference in value & type.

I'm just lost as of what the difference is.

2 Answers

Steven Parker
Steven Parker
231,271 Points

In Python, variables are not typed. Just assign them with something.

A variables value is whatever you assign it to be such as: totalScores=0

totalScores is my variable the value of my variable is 0

or: color=blue so color is my variable blue is the value of my variable make sense?

I'm not sure where you're going with the type issue though. Maybe if you add a bit more detail so that someone trying to answer could put it into perspective and give an appropriate answer. I hope this was helpful.