Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,633 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!")