by using python Write a program that calculates and prints the bill for a cellular telephone company. The company offers three types of service: regular (R or r), Business (B or b), and premium (P or p). Rates vary based on the type of service and are computed as follows: 1. Regular service: 50.00 AED plus first 100 minutes are free. Charges for over 100 minutes are 1.5 AED per minute. 2. Business service: 250.00 AED plus first 300 minutes are free. Charges for over 300 minutes are 1 AED per minute. 3. Premium service: 500.00 AED plus: A. For morning calls made from 6:00 a.m. to 6:00 p.m., the first 500 minutes are free; charges for over 500 minutes are 0.75 AED per minute. B. For evening calls made from 6:00 p.m. to 6:00 a.m., the first 700 minutes are free; charges for over 700 minutes are 0.25 AED per minute. Assume reading client data from the user, and writing the result to console. Format the output to be as the following examples: Sample 1: Enter the Service Type (R, B, P): b Enter the total number of minutes: 450 ======================================== This is a Business Service 300 minutes for 250 AED 150 minutes as extra for 150 min * 1 AED = 150 AED Total Bill 400 AED Sample 2: Enter the Service Type (R, B, P): P Enter the total number of morning minutes: 600 Enter the total number of evening minutes: 400 ======================================== This is a Premium Service 500 morning minutes & 700 evening minutes for 500 AED 100 morning minutes as extra for 100 min * 0.75 AED = 75 AED O evening minutes as extra for 0 min * 0.25 AED = 0 AED Total Bill 575 AED

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question
Question
by using python
Write a program that calculates and prints the bill for a cellular telephone company. The company offers three
types of service: regular (R or r), Business (B or b), and premium (P or p ). Rates vary based on the type of
service and are computed as follows:
1. Regular service: 50.00 AED plus first 100 minutes are free. Charges for over 100 minutes are 1.5 AED per
minute.
2. Business service: 250.00 AED plus first 300 minutes are free. Charges for over 300 minutes are 1 AED per
minute.
3. Premium service: 500.00 AED plus:
A. For morning calls made from 6:00 a.m. to 6:00 p.m., the first 500 minutes are free; charges for
over 500 minutes are 0.75 AED per minute.
B.
For evening calls made from 6:00 p.m. to 6:00 a.m., the first 700 minutes are free; charges for
over 700 minutes are 0.25 AED per minute.
Assume reading client data from the user, and writing the result to console. Format the output to be as the
following examples:
Sample 1:
Enter the Service Type (R, B, P): b
Enter the total number of minutes: 450
============
This is a Business Service
300 minutes for 250 AED
150 minutes as extra for 150 min * 1 AED = 150 AED
Total Bill 400 AED
========
==========
Sample 2:
Enter the Service Type (R, B, P): P
Enter the total number of morning minutes: 600
Enter the total number of evening minutes: 400
This is a Premium Service
500 morning minutes & 700 evening minutes for 500 AED
100 morning minutes as extra for 100 min * 0.75 AED = 75 AED
O evening minutes as extra for 0 min * 0.25 AED = 0 AED
Total Bill 575 AED
Transcribed Image Text:by using python Write a program that calculates and prints the bill for a cellular telephone company. The company offers three types of service: regular (R or r), Business (B or b), and premium (P or p ). Rates vary based on the type of service and are computed as follows: 1. Regular service: 50.00 AED plus first 100 minutes are free. Charges for over 100 minutes are 1.5 AED per minute. 2. Business service: 250.00 AED plus first 300 minutes are free. Charges for over 300 minutes are 1 AED per minute. 3. Premium service: 500.00 AED plus: A. For morning calls made from 6:00 a.m. to 6:00 p.m., the first 500 minutes are free; charges for over 500 minutes are 0.75 AED per minute. B. For evening calls made from 6:00 p.m. to 6:00 a.m., the first 700 minutes are free; charges for over 700 minutes are 0.25 AED per minute. Assume reading client data from the user, and writing the result to console. Format the output to be as the following examples: Sample 1: Enter the Service Type (R, B, P): b Enter the total number of minutes: 450 ============ This is a Business Service 300 minutes for 250 AED 150 minutes as extra for 150 min * 1 AED = 150 AED Total Bill 400 AED ======== ========== Sample 2: Enter the Service Type (R, B, P): P Enter the total number of morning minutes: 600 Enter the total number of evening minutes: 400 This is a Premium Service 500 morning minutes & 700 evening minutes for 500 AED 100 morning minutes as extra for 100 min * 0.75 AED = 75 AED O evening minutes as extra for 0 min * 0.25 AED = 0 AED Total Bill 575 AED
Expert Solution
steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT