Python Python Basics All Together Now Gather Information

Type into console, press enter, and it says "command not found?"

This might be a dumb question, but I type this code in, named the file just like the video, typed it into the console, and it says command not recognized?

Code -


tickets_remaining = 100

Output how many tickets are remaining using the tickets_remaining variable

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

Gather the user's name and assign it to new variable

name = input("What is your name? ")

Prompt the 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 of the tickets (Number of tickets x price per ticket) and shown the cost

amount_due = num_tickets * TICKET_PRICE

Output the cost on screen.

print("The total cost is {}".format(amount_due))

Console -


Press "Enter/Return And this returns: **

bash: command not found

2 Answers

Grigorij Schleifer
Grigorij Schleifer
10,353 Points

Hi Avi, you should type

# no dot between python and masterticket

instead of
Podrig Leoghain
Podrig Leoghain
5,093 Points

Avi you should really mark an answer as correct. Did Grigorij's answer work? (Spoiler: it should do!)

Oh sorry! How do I do that? I marked his as the best answer, but didn't see an option for correct. (New here)

Podrig Leoghain
Podrig Leoghain
5,093 Points

My mistake, 'best answer' is correct (pun intended).

aditya verma
aditya verma
1,069 Points

i just used the File->Open option; as typing python wasnt doing anything.