Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Practice 3.4: Nested Ifs (Mobile Service Provider) 15 pts 0 Not Submitted Due Feb 9, 2020 at 11:59 PM Submission Types Website URL Submission

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Programming Practice 3.4: Nested Ifs (Mobile Service Provider) 15 pts 0 Not Submitted Due Feb 9, 2020 at 11:59 PM Submission Types Website URL Submission & Rubric Description Lesson Objective(s): Work with nested ifs Use or statements to validate menu choices Lesson: Mobile Service Provider A mobile phone service provider has three different subscription packages for its customers: For $39.99 per month 450 minutes Package A: Jare provided. Additional minutes are $0.45 per minute. For $59.99 per month 900 minutes Package B: are provided. Additional minutes are $0.40 per minute. For $69.99 per month unlimited Package C: minutes provided. Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many minutes were used. It should then display the total amount due. Use a dollar sign and two decimal places for currency. Use nested ifs for this assignment. The outer chained if statement should be used to select the package entered. For packages A and B, an inner if statement will be needed to determine if there is an overage of minutes. Input validation: Be sure the user only selects package A, B, or C. Otherwise, display an appropriate error. You should allow both capital and lower case letters, use an or statement (A or Hint: You will need variables for the cost of each package, how many minutes each package provides (if applicable), and how much extra minutes are per package (if applicable). Formatting currency (the full lesson is in Chapter Formatting 2344.789 as a currency amount (you could substitute a variable name): print('$', (format(2344.789, 1.2f') print('$',(format(variable, , 2f) format tells the computer you will be formatting the text, the comma ', indicates that commas should be included in with every 3 number grouping to the left of the decimal point, and the .2f will make the numbers to the right of the decimal point end after two places. Assignment Requirements: Upload your .py file to Git Hub and submit the link to that file. Sample results with test data: Package A: For $39.99 per month 450 min Package B: For $59.99 per month 900 min Package C: For $69.99 per month unlimit Which package do you have? (A, B, C): b How many minutes did you use this month With package B and 935 used, you owe: $ $39.99 per month 450 minutes are provided $59.99 per month 900 minutes are provided $69.99 per month unlimited minutes provic o you have? (A, B, C): b s did you use this month? 935 and 935 used, you owe: $73.99 provided. Additional minutes are $0.45 pe provided. Additional minutes are $0.40 pe s provided. Additional minutes are $0.45 per minute. Additional minutes are $0.40 per minute

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions