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

I can make a variable "name" with my name.

name = print("MyName") doesn't work in my exersise

variable.py
name = print("Franciney")

if u want to create a variable name with your name as a value, you shouldn t use print function. Instead you should use: name = your value and if your value is a string, as in this case, it has to be in ". Therefore, name= "My name" should work.

4 Answers

This will print "Franciney" and the variable ''name" will be empty. Anyway, I don't see this useful. Why you need to store a print in a variable ;)

If you want to display your name:

name = "Your name"
print(name)

It was about an exersise. I'm new on python. Thank you!

I did everything correctly but this is my feedback:

Bummer! Didn't find your variable. Should be like name = "Kenneth".

Jonathan Borteij
Jonathan Borteij
866 Points

variable = "YourNameHere"

Change the word variable to "name"

  • if you want to print this out use print(variable)