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

how do i change 'a' into an integer?

print("Let's do some math!") print(5 + 'a') print("Thanks for playing along!")

errors.py
print("Hello")
name = 'Tash'
print(name)
print("Let's do some math!")
print(5 + 'a')
print("Thanks for playing along!")

3 Answers

I got this error in exchange SyntaxError: EOL while scanning string literal

print("Hello") name = "Tash" print(name) print("Let's do some math!") print(str(5) + "a") print("Thanks for playing along!')

Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

You forgot to change the single-quote (') to a double-quote (")

print("Thanks for playing along!') # forgot to change the single-quote
print("Thanks for playing along!") # try this line

Got a newer error instead now

Bummer! Did you delete some lines? Please don't do that. Fix the errors instead.

print("Hello") name = "Tash" print(name) print("Let's do some math!") print(str(5) + "a") print("Thanks for playing along!")

Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

This will pass the challenge (remember to not delete the blank lines):

print("Hello")
name = "Tash"
print(name)

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

print("Thanks for playing along!")