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 All Together Now Gather Information

syntax error but my variable is written the same

I keep getting a syntax error for "amount_due = numb_ticket * TICKET_PRICE". It shows up as an invalid syntax. Not sure why when its written the same on the video.

Gabe Medina
Gabe Medina
4,688 Points

What's the full code block? Is there a traceback given to your SyntaxError?

Check if you have an unmatched parentheses or something like that.

2 Answers

Megan Amendola
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree seal-36
Megan Amendola
Treehouse Teacher

Hi! In the video, it looks like he has the variable named num_tickets and you have in your code snippet numb_tickets with an extra "b". That could be your issue :)

Thank you to those who answered! I didn't name the variables exactly the same as the video, but tried to follow the code exactly. Not sure what the syntax issue was, even after multiple attempts to correct it. I ended up scrapping and starting from scratch lol. I think maybe my issue was me over thinking...