Write a code that prompts the user to enter in their hourly wage, the number of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a code that prompts the user to enter in their hourly wage, the number of hours worked, the percentage of taxes paid, the amount taken out for retirement, and the amount taken out for healthcare. Compute the amount of the paycheck and display the result. Call this code paycheck.py 4) Prompt the user to enter in the three number that define a quadratic ax + bx + c = 0, that is prompt the user to enter in numbers a, b, c. Compute the two solutions to the quadratic (i.e., solve for x). We will assume the user inputs numbers that result in a positive discriminant. Display the results. Call this code quadratic.py 5) We want to code an example of compound interest. Prompt the user to input a starting balance and an interest rate. Compute the balance after 10 cycles using two methods. One, by computing the balance at each step. Two, by using the formula for compound interest. Here is how compound interest works. Let A be the starting balance. Let r be the interest rate. After one cycle the new balance is A_new= A + A*r or A*(1+r). The process repeats for the number of desired cycles. You should calculate the result by explicitly coding the balance for each of the ten cycles (this is actually fairly easy - it is a cut and paste job). Then you should calculate using the formula A final=A(1+r)**n, where n is the number of cycles. Display the two answers, showing that they are the same. Also, using pencil and paper show that A_final-A(1+r)**n is the correct expression, i.e. prove this result. Write a code that prompts the user to enter in their hourly wage, the number of hours worked, the percentage of taxes paid, the amount taken out for retirement, and the amount taken out for healthcare. Compute the amount of the paycheck and display the result. Call this code paycheck.py 4) Prompt the user to enter in the three number that define a quadratic ax + bx + c = 0, that is prompt the user to enter in numbers a, b, c. Compute the two solutions to the quadratic (i.e., solve for x). We will assume the user inputs numbers that result in a positive discriminant. Display the results. Call this code quadratic.py 5) We want to code an example of compound interest. Prompt the user to input a starting balance and an interest rate. Compute the balance after 10 cycles using two methods. One, by computing the balance at each step. Two, by using the formula for compound interest. Here is how compound interest works. Let A be the starting balance. Let r be the interest rate. After one cycle the new balance is A_new= A + A*r or A*(1+r). The process repeats for the number of desired cycles. You should calculate the result by explicitly coding the balance for each of the ten cycles (this is actually fairly easy - it is a cut and paste job). Then you should calculate using the formula A final=A(1+r)**n, where n is the number of cycles. Display the two answers, showing that they are the same. Also, using pencil and paper show that A_final-A(1+r)**n is the correct expression, i.e. prove this result.
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these programming questions
-
Start of Payroll Project 7-3a October 9, 20-- No. 1 The first payroll in October covered the two workweeks that ended on September 26 and October 3. This payroll transaction has been entered for you...
-
The first payroll in October covered the two workweeks that ended on September 26 and October 3. This payroll transaction has been entered for you in the payroll register, the employees' earnings...
-
1. By integrating Planck's codiation law over all wave hengths power radiated per square meter of a is given by: R(T) = (55) T" proof that the cavity's surface note: x= he AKT 2 xdx 3 % ex-1
-
Compare the annual life insurance premium of Jenny Davis who is 35 years old, and purchases a $250,000, 20-year level term policy using a non-tobacco rate to the premium paid by Chloe Levine, her...
-
Interview an older male you know well about what it means to grow up as a male in their culture. a, Who did you interview? b. What were they told about growing up as a male in their culture? c. How...
-
What is the composition of dry air?
-
Opportunity costs. The Wolverine Corporation is working at full production capacity producing 10,000 units of a unique product Rosebo. Manufacturing cost per unit for Rosebo is as follows:...
-
Q1. Why wheel bearing lubrication is important? Q2. Explain the steps involved in wheel bearing adjustment procedure? Q3. What are the post fitting procedures and checks of wheel hubs and associated...
-
Investment X offers to pay you $5,300 per year for eight years, whereas Investment Y offers to pay you $7,300 per year for five years. Which of these cash flow streams has the higher present value if...
-
3- Find the domain of absolute convergence of the following power series 8 n=1 n (z-1+i)n . (10 Marks)
-
What kind of information can you provide from the label on the door frame of a car?
-
For the current year, Boardwalk Games has the following inventory transactions related to its traditional board games. Date Transactions Units Unit Cost Total Cost January 1 Beginning inventory 102 $...
-
A company is considering purchasing a parcel of land that was originally acquired by the seller for $ 1 0 3 , 0 0 0 . While the land is currently offered for sale at $ 1 8 6 , 0 0 0 , it is...
-
1. Exercise 30.1 (Variants of the Stag Hunt) Consider variants of the n-hunter Stag Hunt. That is, there are n number of hunters. Only m hunters, with 2 m
-
Your audit of ToyWorld Ltd, for the year ended 31 st December 2022, is coming to end. On 28 th January 2023, you discovered that at ToyWorld's annual meeting, dated 28 th December 2022, the board was...
-
There are eight elements of thought in reasoning. We often use more than one element at the same time. For example, your point of view includes assumptions. Therefore, we can assume that these...
-
A parking lot charges $3 for the first hour (or part of an hour) and $2 for each succeeding hour (or part), up to a daily maximum of $10. (a) Sketch a graph of the cost of parking at this lot as a...
-
The swinging spring is an example of a two degree-of-freedom system with a cubic nonlinearity. Indicate whether the statement presented is true or false. If true, state why. If false, rewrite the...
-
The period of free vibrations of a nonlinear system depends upon initial conditions. Indicate whether the statement presented is true or false. If true, state why. If false, rewrite the statement to...
-
A mass attached to a linear spring sliding on a surface with Coulomb damping is an example of a nonlinear system. Indicate whether the statement presented is true or false. If true, state why. If...
Study smarter with the SolutionInn App