79.4k views
19 votes
A movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie distributers. Write a program that calculats a theater's gross and net box office profit for a night. The program should ask the user for the the number of adult, senior, and childeren tickets that are sold. It should then generate a report that looks similar to the following:

User Jiten
by
4.3k points

1 Answer

7 votes

Answer:

def theater_rev():

adult_ticket, children_ticket, senior_ticket = (12, 7, 5.50)

distributer_percent = 0.11

adults = int(input("Enter the number of adult tickets sold: "))

children = int(input("Enter the number of children tickets sold: "))

seniors = int(input("Enter the number of senior tickets sold: "))

print(f"Total tickets sold: {adults + children + seniors}")

gross = (adults * adult_ticket) + (children * children_ticket) + (seniors * senior_ticket)

dist_pay = distributer_percent * gross

net = gross - dist_pay

print(f"Gross box office profit: $ {round(gross, 2)}")

print(f"Amount paid to distributers: ${round(dist_pay, 2)}")

print(f"Net box office profit: ${round(net, 2)}")

theater_rev()

Step-by-step explanation:

The theater_rev python function does accept a parameter. It prompts the user to input data to calculate the total tickets sold, the gross and net profit, and also the amount paid to the distributors of the movies. The function does not return any value but prints out the result of the calculation.

User Milton Castro
by
4.8k points