Question: A mobile phone service provider has three different data plans for its customers: Package A: Package B: Package C: For 39.99 per month, 4

A mobile phone service provider has three different data plans for its customers: Package A: Package B:

A mobile phone service provider has three different data plans for its customers: Package A: Package B: Package C: For 39.99 per month, 4 gigabytes are provided. Additional data costs $10 per gigabyte. For $59.99 per month, 8 gigabytes are provided. Additional data costs $5 per gigabytes. For $69.99 per month, unlimited data is provided. Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many gigabytes were used. It should then display the total amount due. The total amount due should be formatted to only have two decimal places. Input Validation: Be sure the user only selects package A, B, or C. Be sure the number of gigabytes used is not a negative value. Four sample outputs are shown below. Enter your package: b Enter how many gigabytes you used: 7.63 Total Amount Due = $ 59.99 Enter your package: A Enter how many gigabytes you used: 6.35 Total Amount Due = $ 63.49 > Enter your package: F Error: Incorrect package entered Enter your package: c Enter how many gigabytes you used: -6 Error: Gigabytes used cannot be a negative value

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a wellstructured solution in Python incorporating input validation and clear formatting Python def calculatebill package inputEnter your package A B or C upper gigabytesused floatinputEnter how ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!