Question: Intro to Python: Chapter 3; Functions (simple code) Each time you purchase something from a store using your credit card, the store needs to pay
Intro to Python: Chapter 3; Functions (simple code)
Each time you purchase something from a store using your credit card, the store needs to pay VISA or Mastercard or AMEX a fee. The fee is calculated as 10 cents per transaction and then 1.5% of the transaction amount (the whole transaction amount - including tax). Write a program that will ask the user for the price of 3 items. It will make the necessary calculations and then output 5 numbers: the subtotal (before tax), the tax (which is 7%), the total (with tax), the credit card fee, and the net sales to the store (what the store actually gets). For example: If you buy 3 items and they cost $5.99, $13.99, $10.02, then the subtotal is $30.00. The tax is $2.10. The credit card fee is 58 cents (48 cents + 10 cents). The net sales proceeds is 29.42 (the store doesn't get to keep the tax, and it has to pay the credit card companies their fees).
You should have at least 3 functions - one of them should be a "main" function.
Grading:
Program compiles with no syntax errors: 12 points
Program does what its supposed to do: 5 points
You have meaningful comments: 3 points
You should have a multi-line comments at the top that describes what the program does You should have comments that describe what your functions do You should have comments in your program wherever else is deemed useful to the reader of your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
