Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help from computer science expert.? Solving the given question? Using if else, only Do not use def,or anything else.? Wric a Python program

I need help from computer science expert.?
Solving the given question?
Using if else, only
Do not use def,or anything else.? image text in transcribed
Wric a Python program that cakulatcs and prints the bill for a cellar tckphone company. The company offers two types of services: regular and premium Its rates vary depending on the type of the service. The rates are computed as folows The first 50 minutes are free. for over 50 minutes are 200 Baiza per minute iRials phus For calls made during the day from 6:00 am to 6:00 p.m, the first 75 minutes are frec charges for over 75 minutes are 10 Baira per mnute For calls madk during the night from 6:00 p.m to 6:00 am, the first 100 minutcs scrvce for over 100 minutes are 5 Baiza per minute Your program should prompe the user to enter an account number, a service code type, and the number of minutes the service was used. A service code of r or R means reular service; a service code of p or P means premium service. Treat any other character for tbe service code as an error Give an error message for neptne mber of minutes used. For the premium service, the customer may use the service during the day and the night Therefione, to cakculate the bill you must ask the user to input the number of minutes the service was used during the day and the mumber of minutes the service was used during the night Use readable variable names and define appropriate named constants for various cost rates and boundary minutes values Your program should output the account number, type of service, number of minutes the telkphone service was used, and the amount due, in the format shown in the sample runs (See Figires (a)-1t Test your program thoroughily umber: 11223344 Ester service type: (r or R for repla, por )for premium service Emor: Invalid service type Figre 1 (ak Invalid service type Figure I (b: Invald minutes used Figure 1 (ck Regular service, below 50 minutes Figure I (di: Regular service, exceeding 50 minutes Enter service type Iror R for regular, p or P) for premium service Enter day time minutes uned 70 Enter night smeminutes used:-70 mor Invalid day minutes used Figure 1 (e): Premium service, invalid day minutes used Figure I (f Premium service, invald night minutes used Figure (g: Premium service, not eceeding day and night Fiare1 t minutes used Premium service, eceeding day and might minutes used Wric a Python program that cakulatcs and prints the bill for a cellar tckphone company. The company offers two types of services: regular and premium Its rates vary depending on the type of the service. The rates are computed as folows The first 50 minutes are free. for over 50 minutes are 200 Baiza per minute iRials phus For calls made during the day from 6:00 am to 6:00 p.m, the first 75 minutes are frec charges for over 75 minutes are 10 Baira per mnute For calls madk during the night from 6:00 p.m to 6:00 am, the first 100 minutcs scrvce for over 100 minutes are 5 Baiza per minute Your program should prompe the user to enter an account number, a service code type, and the number of minutes the service was used. A service code of r or R means reular service; a service code of p or P means premium service. Treat any other character for tbe service code as an error Give an error message for neptne mber of minutes used. For the premium service, the customer may use the service during the day and the night Therefione, to cakculate the bill you must ask the user to input the number of minutes the service was used during the day and the mumber of minutes the service was used during the night Use readable variable names and define appropriate named constants for various cost rates and boundary minutes values Your program should output the account number, type of service, number of minutes the telkphone service was used, and the amount due, in the format shown in the sample runs (See Figires (a)-1t Test your program thoroughily umber: 11223344 Ester service type: (r or R for repla, por )for premium service Emor: Invalid service type Figre 1 (ak Invalid service type Figure I (b: Invald minutes used Figure 1 (ck Regular service, below 50 minutes Figure I (di: Regular service, exceeding 50 minutes Enter service type Iror R for regular, p or P) for premium service Enter day time minutes uned 70 Enter night smeminutes used:-70 mor Invalid day minutes used Figure 1 (e): Premium service, invalid day minutes used Figure I (f Premium service, invald night minutes used Figure (g: Premium service, not eceeding day and night Fiare1 t minutes used Premium service, eceeding day and might minutes used

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

Desired benefits for the individuals, the team and the organization

Answered: 1 week ago

Question

This model is different the one we ordered.

Answered: 1 week ago

Question

This is a project into which you can sink your teeth.

Answered: 1 week ago

Question

Their computer is similar ours.

Answered: 1 week ago