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

Brandon McGugin
Brandon McGugin
1,332 Points

What is it asking?

so now i can change a in the 2nd to last line.. still getting errors..

What is it asking?? ._.'

I've made corrections to all errors i see, made two vars for the 'name' and 'a'.. not sure what i am supposed to do

errors.py
name = input("What is your name?")
print("Hello")
print(name)
print("Let's do some math!")
b = input('enter number here')
a = int(b)
print(5 + a)
print("Thanks for playing along!")
Jake Goodman
Jake Goodman
3,381 Points

So there are no syntax errors in your code, so I don't know why it is not being accepted. I just tried to do the challenge and it worked for me when I just declared the variables 'name' and 'a' as literals, not taking input. I believe this code challenge is just trying to get you to declare variables on your own.

Brandon McGugin
Brandon McGugin
1,332 Points

Jake, Thank you... I guess i was hitting it from a view to allow different inputs.. this really took me a day of reviewing, and searching.. thank you!

1 Answer

Jeff Wilton
Jeff Wilton
16,646 Points

From what I can tell, it doesn't like the input statements... perhaps that is a bit too advanced for this module.

Something like this would work:

print("Hello")
name = "Bob"
print(name)

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

print("Thanks for playing along!")