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 make a Variable

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.

could you give me a example?

variable.py
Variable = "Name"
'Name = "Ricky"'

2 Answers

Chris Jones
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Chris Jones
Java Web Development Techdegree Graduate 23,933 Points

Hey Richard!

The first part of the quiz is to make a variable and name the variable "name". Then assign your name to the variable. We do this like so:

name = "Richard"

Let me know if you have any more questions!

Sam Fellows
Sam Fellows
3,968 Points

yup as per the comments above it would be

name = "Richard"

"name" being the variable name. Your name being the thing inside of the variable. Its a string because in this case its a word not a number or Boolean.

Hope this help.