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 trialTashfin Shahid
Courses Plus Student 119 Pointshow do i change 'a' into an integer?
print("Let's do some math!") print(5 + 'a') print("Thanks for playing along!")
print("Hello")
name = 'Tash'
print(name)
print("Let's do some math!")
print(5 + 'a')
print("Thanks for playing along!")
3 Answers
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsYou can't make 'a' an integer, but you can make 5 to a string with the str() method
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsYou 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
Tashfin Shahid
Courses Plus Student 119 PointsGot 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
Python Web Development Techdegree Student 38,322 PointsThis 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!")
Tashfin Shahid
Courses Plus Student 119 PointsTashfin Shahid
Courses Plus Student 119 PointsI 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!')