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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education