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 trialJaime Ponce
209 Pointscreate a variable using a string
I am new at this and i am having issues with the question. Create a variable named "Treehouse" by combining two strings 'Tree' and 'House'
name='treehouse'
print(name+ 'house')
2 Answers
Steve Hunter
57,712 PointsHi Jaime,
At that point, your code should look something like:
name = "Steve"
treehouse = "Tree" + "house"
I hope that helps.
Steve.
Jesús Rojas
230 PointsSure, I did {code} treehouse = "Tree" + "house"{code}, it is not a big problem, I think it is more of the task checker, I dont know what it is expecting from us to write and it just makes me uncomfortable not being able to finish it.
Jesús Rojas
230 PointsJesús Rojas
230 PointsHey Steve, I did that and makes sence, however somehow the checker does not approve that! stills show as wrong code, also I printed it out on the console but no go
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsCan you paste your code please? Let's have a look at what might be wrong.
Steve.
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsIf you typed that, then your code is absolutely correct. That would mean the task would pass - did you overwrite/delete the first task? That would cause an error as the code from each task is expected to stay in-place. I can't think of any other reason why that code would fail - does the compiler not provide a reason for the failure? It often gives some hints.
Steve.
Jaime Ponce
209 PointsJaime Ponce
209 Pointsthanks for your help, that worked.