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

Syntax error for line 1

I did this exercise and tried testing it outside of workspaces and for some reason I keep getting this syntax error for line one.

Terminal: Please enter your name: b Traceback (most recent call last): File "challenge.py", line 1, in <module> name = input("Please enter your name: ") File "<string>", line 1, in <module> NameError: name 'b' is not defined

Code name = input("Please enter your name: ") number = input("Please enter a number: ")

TODO: Make sure the number is an integer

number = int(number)

TODO: Print out the User's name and the number entered,

making sure the two statements are on separate lines of output.

1 Answer

Could you please post your code. :)