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 trialomid nassir
8,771 PointsPython code challenge 1
Hello, I can't figure out what I am doing wrong in this code challenge. I added a variable called name and stored my name in there. And I added a variable called number and stored an int "5" but it's saying there is a syntax error.
print("Hello")
name = "omid nassir"
print(name)
print("Let's do some math!")
number = 5
print(5 + number)
print("Thanks for playing along!')
1 Answer
Steven Parker
231,269 PointsYou missed an error on the last line.
The very last line is:
print("Thanks for playing along!')
Look closely at the syntax coloring and you'll see a clue where the closing parenthesis is the same color as the string. Python doesn't think the string has ended yet, because a different symbol was used at the end than was used at the beginning. Either symbol can be used to enclose a string, but they must match.
Fix that, and you should have everything done.
omid nassir
8,771 Pointsomid nassir
8,771 PointsThanks! That did the trick.