Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics All Together Now Branch and Loop

Syntax Error for this Challenge

Hello, I keep getting a syntax error every time I run the code. the Error comes on for line 16 of my code total=requested_tickets * TICKET_PRICE. I get an invalid Syntax error and according to the video and other files I have read I don't understand what is incorrect.

https://w.trhou.se/yc9oe4epf2 Screenshot of the workSpace. Not sure whats wrong with the syntax of line 16. Any help i'm grateful for.

2 Answers

Hi Randolph

You are missing ')' on line 15 in the end, it should be:

requested_tickets = int(input("Thanks {}, please tell me how many tickets are you interested in today? ".format(Guest)))

Sometimes when Python complains and points you to a specific row it can be you need to look a row higher or a row lower.

Good luck!

Alexander Zakharov Thank you so much! Such a small error I didn't notice it. I guess this is what happens doing this at 03:00 lol. Also, many thanks for the tips. I will remember that.

No worries, Randolph, happy to help! I've been there recently...had a bug in my code and stayed up almost half of the night trying to find & fix it :-)