Python Python Basics All Together Now Gather Information

My code won't run

TICKET_PRICE = 10

tickets_remaining = 100

print("there are {} tickets remaining.".format(tickets_remaining )

Name = input("type in your name?")

Number_of_tickets=input( Name "how many tickets would you like to by? ...")

Num_tickets=int(Number_of_tickets)

Amount_due=Num_tickets*TICKET_PRICE

print("The total {0} is...".format( Amount_due))

When I try to run this code I get the following error File "masterticket.py", line 7
Name=input("type in your name?")
^
SyntaxError: invalid syntax

2 Answers

Ben Hedgepeth
Ben Hedgepeth
Python Web Development Techdegree Student 7,386 Points

On Line 3, you are missing a paren.

On Line 5, you didn't format your string properly.

On Line 8, I would recommend using a string as placeholder within {}. Then within .format(), type a keyword argument such as .format(amount=amount_due).

caits
caits
4,573 Points

It looks like you're missing a ) at the end of

print("there are {} tickets remaining.".format(tickets_remaining )