Python Python Basics All Together Now Gather Information

Chandelor Simon
Chandelor Simon
2,242 Points

What Monty Python work is being referenced in this code???

What Monty Python work is being referenced here:

(First person to guess correctly gets best answer! This is more discussion than question, but it's an example of how to tweak the code a bit to make it your own):

TICKET_PRICE = 10

tickets_remaining = 100 

# Output how many tickets are remaining using the tickets_remaining variable

print("We presently have {} tickets remaining\n".format(tickets_remaining))

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

name = input("Hello, fellow coconut banger! What is your name?   ")

# Prompt the user by name and ask how many tickets they would like

tickets_needed = input("\nThank you, {}! What is your quest? (How many tickets would you like?)    ".format(name))

print("\nWhat... is the airspeed velocity of an unladen swallow?\n\nJust kidding - we won't toss you from a bridge this time!\n\nLet's see - {}, you say?".format(tickets_needed))

tickets_needed = int(tickets_needed)
not_count = tickets_needed + 1
nor_either = tickets_needed - 1
right_out = tickets_needed + 2

print("\nThen, shalt I count to {}. No more. No less. \n{} shalt be the number I shalt count, and the number of the counting shall be {}. \n{} shalt I not count, nor either count I {}, excepting that I then proceed to {}. \n\n{} is right out.".format(tickets_needed, tickets_needed, tickets_needed, not_count, nor_either, tickets_needed, right_out))

# Calculate the price (number of tickets they want multiplied by price) and assign it to a variable

price = TICKET_PRICE * tickets_needed

# Output the price to the screen

print("\nYour ticket total comes to ${}, {}.".format(price, name))````

2 Answers

Chandelor Simon
Chandelor Simon
2,242 Points

Brendan - I think you commented, not answered. If you do - the "best answer" is yours!

Adam Balogh
Adam Balogh
1,307 Points

Monty Python and the Holy Grail: 1-Bridge of death,
2-instructions for the Holy Hand Grenade of Antioch