Python Python Basics All Together Now Gather Information

Hi guys help me, am running the following code but its giving an error syntax message!

TICKET_PRICE = 10 tickets_remaining = 100
TICKET_PRICE = 10 ticket_remaining = 100

Out put how many tickets remaining using the tickecket remaining

print("There are {} tickets remaining".format (ticket_remaining)

Gather the user”s name and assign to it to a new varaiable

name = input("What is your name? "

prompt user by name and ask how many tickets they would like?

num_tickets = input("How many tickets would you like {}?".format(name)) num_tickets = int(num_tickets)

Calculate the price (number of tickets multiplied by the price)

amount_due = num_tickets * TICKET_PRICE

Out put the price to the screen

print ("The total_due is ${}".format(amount_due)

2 Answers

Steven Parker
Steven Parker
171,342 Points

It looks like most of the function calls are missing the final closing parenthesis at the end of the line.

For example:

name = input("What is your name? "    # original code
name = input("What is your name? ")   # fixed

For future questions, please use Markdown formatting for the code. Instructions can be found in the Markdown Cheatsheet pop-up below the "Add an Answer" area. :arrow_heading_down:   Or for more detailed instructions, you can watch this video on code formatting.

Thanks Steve, I wonder why I couldn't pick this!