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 (Retired) Ins & Outs Ins & Outs

Tyler Ruby
Tyler Ruby
499 Points

i have no idea

I have absolutely no idea what to do or what im doing wrong... i can not assign a variable of name with name, no matter what i do i get some sort of error...

1 Answer

Tyler Lowrey
Tyler Lowrey
14,538 Points

In order to create a variable in python the syntax is as follows:

variableName = "Your name here";

All you need to do is replace variableName with the name of the variable you want, which in this case is name, and then replace the text inside the quotes (") to your name or quite honestly anything you choose. The semi-colon (;) in the above example is optional.

I hope this helps. If you continue getting errors after trying that above, please post the error that you receive so we know more about what is going on.