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

how to write a variable

how to write a variable

variable.py
name = payman

1 Answer

Your so close!

However, in your code, Python has no idea that the string "Payman" is supposed to be a string. Python thinks it's another variable, but it doesn't exist, so Python spits an error at you!

To tell Python that it's a string and not a plain old variable, you have to wrap it in double or single quotes, like this:

"Payman"

Note that I didn't put in the answer for you. I'm only hinting you. If I provide the solution, you might just copy-and-paste my code snippet and pass the challenge without trying to understand what's going on wrong.

I think you can complete this on your own now, but if you fail again, please post your new code snippet and I'll try to help further.

I hope this helps :grin:

Happy C0D1NG! :tada:

:dizzy: ~Alex :dizzy: