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 Create a variable

Challenge Task 1 of 1 Hey! I know we haven't written any code yet, but you've already seen what a variable looks like

Challenge Task 1 of 1

Hey! I know we haven't written any code yet, but you've already seen what a variable looks like, so I want you to try and make one. Make a variable named name. Then, assign it to your own name. Your name should be a string, so you need to put quote marks around it.

Answer: I've added the following and it not working..? Please help...? var name = "Simon";

variable.py

4 Answers

Neil Anuskiewicz
Neil Anuskiewicz
11,007 Points

Simon, I'm taking Python Basics right now too. It takes a bit of getting used to but this is really all your need:

name = "Simon"
Catherine Du
Catherine Du
1,461 Points

this doesn't work for me

Zachary Kaufman
Zachary Kaufman
1,463 Points

Var name can't have a space and you don't need a ; afterward

Zachary Kaufman
Zachary Kaufman
1,463 Points

I hope you enjoy Python, it gets a little complicated (in my opinion) but I can see how useful and worth learning it is.

Neil Anuskiewicz
Neil Anuskiewicz
11,007 Points

Zachary, while the problems can be tough, the language itself gets out of the way.. I kind of like that Python enforces a standard coding style, making it easier to read code without going crazy.

Python flows almost like the pseudo code you'd naturally write. So I think it's complicated because the problems are complicated but I like the tool a LOT. What language do you like better?

Zachary Kaufman
Zachary Kaufman
1,463 Points

I didn't know a single line of code on December 24th, December 25th I signed up for a website called Codecademy and Python was the first language I took, and I didn't like it haha. It seemed hard to follow at times and having to follow specific whitespace protocols seemed... stupid. So I quit that, took Ruby which I really enjoyed, finished Ruby and went onto HTML/CSS which was fine but I'm really not good at CSS. After doing that I did Javascript and it seemed extremely useful but it is so hard to correct your mistakes in Javascript because there's so many possible things you could have done wrong (plus like I said I wasn't good at CSS which usually goes along with Javascript) then I signed up for Treehouse and retook Python and now that I have tried a few languages and understand programming more I really appreciate Python and everything that it is capable of, along with the Python community. I think as of now Python is my favorite language, but Ruby is up there too. I think I like Ruby syntax better, but I heard Ruby is often unstable and changes often, so when choosing a language to use between Python and Ruby I will most likely choose Python. Keep in mind though, I have only barely gotten past Python Basics and I still have a while before I can do a Python project without following along with a video so my opinion may change, I hope not. :D