Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Homework 3A: Performing Calculations Objective: The objective of this assignment is to be able to write code to get input from the user, perform calculations, and display formatted output This is an...

1 answer below »

Homework 3A: Performing Calculations
Objective: The objective of this assignment is to be able to write code to get input from the user, perform calculations, and display formatted output
This is an Individual assignment and should reflect individual work. Please see the section on Academic integrity in the syllabus.
Assignment Instructions
1. Write a program to calculate and output order subtotal amount, total sales tax amount, and order total amount. Ask the user to provide following information:
a. Price and quantities for 3 items
. Sales tax in % (e.g. 8.8% should be entered as 0.088)
2. Write a program that asks the user for the number of miles driven and the gallons of gas used. It should calculate the car’s MPG (Miles per Gallon) and display the result.
3. Write a program to calculate and output the present investment amount given the future expected earnings, interest rate, and timeframe to hold the investment amount. Ask the user to provide following information:
a. Future expected earnings i.e. FV
. Expected annual interest rate i.e.
c. Timeframe in years i.e. n
For example, how much do you need to invest today (i.e. Present Value PV) at 10% (i.e. interest rate r) compounded annually in order to have $1,000,000 (i.e. future value FV) 20 years (i.e. number of years, n) from today?
Use the following formula
     XXXXXXXXXX
PV = FV * -----------------
     XXXXXXXXXXr) n
4. Calculate and output monthly loan payment. Ask the user to provide following information:
a. the loan amount (P),
. APR i.e. Annual Percentage Rate (e.g. 5% should be entered as 0.05)
c. loan terms in number of months (n).
Use the formulas below to calculate and output monthly loan payment:
= APR in percentage / 12,
                r * (1 + r) n
Monthly Payment (A) = P *     ---------------------
                (1 + r) n - 1
5. Write a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter their name, the charge for the food, what percent tip, and 7 percent sales tax. Display each of these amounts and the final total amount along with the user name.
Submission Instructions
1. Please review you code and make sure it runs without any e
ors.
2. Make sure all the outputs are formatted appropriately.
3. Rename the file with your first and lastname
4. Upload your .ipynb notebook file using blackboard by the due date mentioned in the schedule page.
5. If you have any questions or difficulties regarding the assignment, please reach out to me directly via email XXXXXXXXXX in timely fashion.
Answered Same Day Feb 25, 2022

Solution

Neha answered on Feb 25 2022
109 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here