Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 = "Name"
'Name = "Ricky"'

2 Answers

Chris Jones
.a{fill-rule:evenodd;}techdegree seal-36
Chris Jones
Java Web Development Techdegree Graduate 23,920 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.