- Engineering
- Computer Science
- want to create a ticket calculator based on this table...
Question: want to create a ticket calculator based on this table...
Question details
want to create a ticket calculator based on this table
Seating Area |
Ticket Price (Weekdays) |
Ticket Price (Weekends) |
Concession* (not available on weekends) |
Stalls |
$75 |
$105 |
$55 |
Dress Circle |
$85 |
$115 |
$65 |
Upper Circle |
$60 |
$85 |
$40 |
consession is for under 18 and over 65
so obivously inputs are how many tickets, what day, where you sitting,how many consessions are included.
what im struggling with is all the different prices how to call the right variables. here is my code so far.
W_stalls = 75
W_dress_circle = 85
W_upper_circle = 60
WE_stalls = 105
WE_dress_circle = 115
WE_upper_circle = 85
consession_stalls = 55
consession_dress = 65
conssion_upper = 40
NUMBER_OF_TICKETS = int(input("How many tickets would you like? :"))
if NUMBER_OF_TICKETS >= 6:
print("You get a 5% discount")
print()
print("Where would you like to sit?")
SEATING = int(input("1 = Stalls, 2 = Dress Circle, 3 = Upper Circle"))
if SEATING == 1:
W_stalls = 75
print("Thats $75 a ticket")
if SEATING == 2:
W_dress_circle = 85
print("Thats $85 a ticket")
if SEATING == 3:
W_upper_circle = 60
print("Thats $60 a ticket")
DAY = int(input("What day will you be attending 1 = Monday, 7 = Sunday"))
if DAY == ("1", "2", "3", "4", "5", "6", "7"):
if DAY == ("1", "2", "3", "4", "5"):
price1 = NUMBER_OF_TICKETS * W_stalls
price2 = NUMBER_OF_TICKETS * W_dress_circle
price3 = NUMBER_OF_TICKETS * W_upper_circle
concession = int(input("Number of concession tickets included (under 18, over 65 or student):"))
consession_total = concession * SEATING
print(consession_total)
if DAY == (6, 7):
price4 = NUMBER_OF_TICKETS * WE_stalls
price5 = NUMBER_OF_TICKETS * WE_dress_circle
price6 = NUMBER_OF_TICKETS * WE_upper_circle
Solution by an expert tutor
