A new movie theatre has three different subscription packages
for its customers:
Package A: For $18.95 per month, the customer can watch 2 movies.
Any additional movie requires
an additional $2 per movie.
Package B: For $22.95 per month, the customer can watch 4 movies.
Any additional movie requires
an additional $1 per movie.
Package C: For $30.99 per month, the customer can watch an
unlimited amount of movie.
Write a script (Python) that calculates a customer’s monthly
bill.
It should ask the user to enter the letter of the package purchased
(A, B, or C) and the number of movies
watched. Using that information, your program should display the
total bill.
Your program should also display an error message and stop if the
user enters any invalid values.
package = input("Enter the letter of the package purchased (A, B, or C): ") movieCount = int(input("Enter number of movies: ")) totalBill = 0 if(package=='A'): totalBill = 18.95 if(movieCount>2): totalBill += ((movieCount-2)*2) elif(package=='B'): totalBill = 22.95 if (movieCount > 4): totalBill += ((movieCount - 4) * 1) elif(package=='C'): totalBill = 30.99 else: print("Invalid package") print("Total bill =",totalBill)
Get Answers For Free
Most questions answered within 1 hours.