Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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))````

Nice! :D

Loved this post! :)

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