movie ticket sale and donating to charity python program
movie ticket sale and donating to charity python program
1 Answer
movie=input("Enter the movie name: \n")
adult_ticket_price=int(input("Enter the price of an adult ticket: \n"))
child_ticket_price=int(input("Enter the price of a child ticket: \n"))
adults_tickets_sold=int(input("Enter the number of adult tickets sold: \n"))
child_tickets_sold=int(input("Enter the number of child tickets sold: \n"))
percentage=int(input("Enter the percentage of the gross amount donated to the charity: \n"))
grossAmount = ((adult_ticket_price) * (adults_tickets_sold)) + ((child_ticket_price) * (child_tickets_sold))
amountDonated = ((grossAmount) * (percentage / 100))
netSaleAmount = ((grossAmount) - (amountDonated))
print("Movie Name: " + (movie))
print("Number of tickets sold: " + str(adults_tickets_sold+child_tickets_sold))
print("Gross amount is : " + str(grossAmount))
print("Amount donated is: " + str(amountDonated))
print("Net sale amount: " + str(netSaleAmount))