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
Aaron McCans
10,095 PointsTask two, is no longer passing in Python concatenates name = "subject" NameError: name 'subject' is not defined
How do I correct this error because each time I try it on Workspace it works fine but not in the quiz?
3 Answers
jonlunsford
16,746 PointsLooks like you should have 2 variables: “name” and “subject”. Name should be a string of your name, and subject will be a concatenation of “Treehouse loves “ and the name variable.
Example: name = “Aaron” subject = “Treehouse loves “ + name
Aaron McCans
10,095 PointsMake a new variable named subject that concatenates (uses the + sign) the string "Treehouse loves" and your name variable.
name = "Aaron" name = "subject" status_message = "subject " + "Treehouse loves " + "Aaron"
Aaron McCans
10,095 PointsThank you Jonlunsford for adjusting my thinking on the matter I see now where I went wrong.
Thank you,
Aaron Mc
jonlunsford
16,746 Pointsjonlunsford
16,746 PointsAaron: Can you provide your code for this code challenge?