Python

Anthony Carey
Anthony Carey
Python Development Techdegree Student 899 Points

Getting a Syntax Error

Hello! The error Is in the masterTicket.py file in this workspace: https://w.trhou.se/xxrcyys7ne File "masterTicket.py", line 16 amountDue = (numberOfTickets * ticketPrice) ^ SyntaxError: invalid syntax

1 Answer

Steven Parker
Steven Parker
194,962 Points

Many times the system will not discover an error until it sees the next code line. So when you can't see anything wrong on the line specified, look at the previous line and you'll often see a syntax issue. .

Anthony Carey
Anthony Carey
Python Development Techdegree Student 899 Points

I'm pretty new to this stuff but I do understand the general idea of what you are trying to say. So I tried to recreate my code from scratch just to get rid of any spacing errors and I ended up finding that on line 13 I forgot an extra closing parentheses! It seems to work now, thank you very much :)