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

Justin Rhedrick
Justin Rhedrick
198 Points

where is my syntaxerror Eol for this code

can you help me locate my syntax error?

errors.py
print("Hello")
print(name)

print("hello")
print('name')

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

print("Thanks for playing along!')
      print("thanks_for_playing_along!")
Oszkár Fehér
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Oszkár Fehér
Treehouse Project Reviewer

Hi Justin. you need to correct the existing lines not making other lines, only one line you can add, to create a name variable first or ' ' around the name attribute, and inside string those _ will not change nothing. that _ it's still a string like a space between words. In 5 + "a", what you did it works but its better if you make it like:

print(str(5) + "a")

And like this you keep the old code just add a method so it can add together 2 strings. I don't want to write all the answer because this is an easy quiz but i hope you can understand. Happy coding

Cheo R
Cheo R
37,150 Points

Second to last print, you're using two kinds of quotation marks.

1 Answer

Justin Rhedrick
Justin Rhedrick
198 Points

thanks Oszkar (sorry for the incorrect speling