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

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