Question

A new movie theatre has three different subscription packages for its customers: Package A: For $18.95...

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.

Homework Answers

Answer #1
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)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
NetFlix offers viewers access to stream movies and television shows through its subscription-based service. When it...
NetFlix offers viewers access to stream movies and television shows through its subscription-based service. When it first offered a standard standalone streaming package in 2011, a large share of consumers were delighted that for $7.99 per month, they could receive all the content NetFlix has to offer. In 2014, NetFlix decided to raise the price of the standard plan to $9.99 per month. In 2017, the price again increased to $10.99 per month. Despite these price increases, NetFlix remains popular....
Directions: Develop an E-R (or EER depending upon need) Diagram. List all assumptions. Show the version...
Directions: Develop an E-R (or EER depending upon need) Diagram. List all assumptions. Show the version 1 (entities and data only) and version 3 (entities, attributes and relationships with cardinalities and participation constraints). 20 points of the grade will be based on evaluating your assumptions - you must give a detailed list of your assumptions identifying anchor concepts, data associated with the anchor and data that has more than one anchor participating in it. Remember, we are not talking out...
What tools could AA leaders have used to increase their awareness of internal and external issues?...
What tools could AA leaders have used to increase their awareness of internal and external issues? ???ALASKA AIRLINES: NAVIGATING CHANGE In the autumn of 2007, Alaska Airlines executives adjourned at the end of a long and stressful day in the midst of a multi-day strategic planning session. Most headed outside to relax, unwind and enjoy a bonfire on the shore of Semiahmoo Spit, outside the meeting venue in Blaine, a seaport town in northwest Washington state. Meanwhile, several members of...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how...
Delta airlines case study Global strategy. Describe the current global strategy and provide evidence about how the firms resources incompetencies support the given pressures regarding costs and local responsiveness. Describe entry modes have they usually used, and whether they are appropriate for the given strategy. Any key issues in their global strategy? casestudy: Atlanta, June 17, 2014. Sea of Delta employees and their families swarmed between food trucks, amusement park booths, and entertainment venues that were scattered throughout what would...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT