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 Correct errors

I don't understand the question, this is vague, please clarify with smaller steps or something.

Guys we are making way to big of steps here, you completely lost me and I was on a good track of working through the courses.

As a newbie I shouldn't be given 9 lines of code and given = find the errors. Come on I barely know print from def or () vs " "


print("Let's do some math!")
print(5 + "a")

print("Thanks for playing along!')

2 Answers

Andrew, I've commented in the code re the needed changes. As always, there are other ways to do this:


name = "Joe" #name needs to be declared and initialized before being printed

print("Let's do some math!")
a = 3  #a needs to be declared and initialized before being added to 5
print(5 + a)

print("Thanks for playing along!") #the single quote at the end needs to be changed to a double quote

Thank you. FYI

How did you know... Wait. There was no declared variables other than a list of code, it feels like I am throwing dart ideas at a poorly worded exercise. There is an awfully big assumption that <beginners> will know what your referring to or asking for.

Remember how much you guys know or how much code you have already learned and you are forgetting we are just starting, we know less that you do.

Smaller steps. Please.