Question: Program 1 . Investment Calculator: Create a Python program that calculates investment gain a user will get at the end of the investment term. The
Program Investment Calculator: Create a Python program that calculates investment gain a user will get at the end of the investment term. The program should contains the following functions:
main: call function getinvestmentinfo to get invested amount, invested term in years, and investment annual interest rate; pass the above information to function calcinvestment to find the future value and total interest earned by the end of investment term; finally pass all data to displayinfo so they can be displayed the details on the console.
getinvestmentinfo: ask user enter invested amount, invested years, and apr, cast them in reasonable data type, and returns them back to caller.
calcinvestmentprinciple apr, term: received invested amount, invested years, and apr from caller and returns future value and total interest earned back to caller. You may use the following formula to calculate future value. The total interest earned is future value invested amount.
future value principle apr term
total interest earned future value principle
displayInfoprinciple apr, term, futurevalue, gain: receives invested amount, invested years, invested apr, future value, and total interest earned from caller and display them in a professional format.
Finally call to run the main function.
Program : Weekly Pay Calculator: An employees total weekly pay equals the hourly wage multiplied by the total number of regular hours worked plus any overtime pay. By default, hours worked beyond are treated as overtime hours and times of the regular hourly wage for per overtime hour. Note: Your program should allow user to specify regular hours other than and overtime pay rate other than times of regular hourly wage.
Your program should start with a main function to calls other functions to solve the problem
gethoursworkedandhourlyrate: asks user to enter hours worked and hourly pay rate and returns those numbers to caller
calculategrosspayhoursworked, hourlypayrate, regularhour overtimepaymultiplier : works on the receiving parameters and returns the calculated result to the caller. If the caller does not pass the regularhour andor overtimepaymultiplier, use the default value and
printpaystubhoursworked, hourlypayrate, grosspay: prints out the receiving parameters in accounting format
Finally call to run the main function.
Requirements for both programs:
The program should contain an introductory docstring to describe what the program will do analysisand how it will do it design the program in the form of a pseudo code algorithm
Include suitable prompts for all inputs, and label all outputs appropriately
Format the outputs with accounting format. For example dollar should be formatted as $
After you have coded a program, be sure to test it with a reasonable set of legitimate inputs
Submit the py files here for grading
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
