Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Python The following parts must be written in one Python file. a) A bank charges $8 per month plus the following fees: Check Fee

Use Python The following parts must be written in one Python file.

a) A bank charges $8 per month plus the following fees:

Check Fee Number of checks
$.09 each Fewer than 20 checks
$.07 each 20 39 checks
$.06 each 40 - 59 checks
$.05 each 60 or more checks

If the number of checks is a negative number or 0, issue an error message and do not calculate anything. The program should ask the user for the number of checks and compute and display the total fee. For example, if a person writes 10 checks, the fees displayed will be: $8.9. How did I get this number? (8 + 10*.09). Note that youre using decision statements to decide how the calculation will be performed. How about if the number of checks written is 42? The fee will be: $10.52. Make sure to format the amount of checking fee to 2 digits after the decimal point.

b) Ask for total amount for an online shopping order and calculate the shipping cost based on the following table. Also, calculate the total cost (order amount + shipping cost). Of course, one must also ask for the destination location (within USA or Canada). If the total input order is 0 or less or it is more than $10,000, display an error message and do not perform any calculation. Issue an error message, if the destination is not one of USA or Canada. When comparing the country values, dont worry about looking for the case of the entry. You can assume that the valid country values are USA and Canada. So, if the user enters Canada (all lower case), this is considered to be an invalid destination. Make sure to format the amount of shipping cost to 2 digits after the decimal point.

Order Total Ship Amount within USA Ship to Canada
0 to less than $50 $6 $8
$50 to less than $100 $9 $12
$100 to less than $150.00 $12 $15
$150 or more 0 0

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

Students also viewed these Databases questions

Question

Identify the types of informal reports.

Answered: 1 week ago

Question

Write messages that are used for the various stages of collection.

Answered: 1 week ago