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 trialTrevor Rydalch
2,184 PointsWhy do I keep getting a NameError?
I'm doing task 1 of 2. I've written one line of code:
varl = 'rovert'
And it keeps telling me that name 'varl' is not defined. Why?
When I write this code in Workspace, it has no error.
varl = 'rovert'
2 Answers
Steven Parker
231,275 PointsIt looks like you defined "varl
" (ending with a lower-case "L")
The challenge is asking you to define "var1
" (ending with the number 1)
I recommend cut-and-paste when specific names or strings are required.
Trevor Rydalch
2,184 PointsThank you! Silly error. Good advice.
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsGood call Steven.
But in his actual code snippet above, it looks like a number one. The typed part above looks like an L...
Sometimes fonts ... LOL.
I have deleted my obvious erroneous answer. :)