Question: code should be in python python version 3 For Americans entering the work force in the 2020s, most of their retirement income will be a
python version 3
For Americans entering the work force in the 2020s, most of their retirement income will be a from a the money they have invested over their working career. A critical question for all workers is how much money they need to save each month to have enough money to retire. We are going to model this. Our model is going to make a few assumptions- 1. The user will need 100% of their pre-retirement income 2. Social Security will provide 15% of this value, 85% will come from Investments! 3. The user will invest a fixed amount each month until they retire-at which point they stop investing new money (no new monthly investments) 4. The user will withdraw a fixed amount from your retirement account each month 5. The model will ignore Inflation - this may substantially underestimate how much needs to be saved 6. Monthly interest rate= annual interest rate / 12-this can be a little off depending on the type of interest This type of investment approximates an annuity strategy 3. 3. The program can be worked in 3-stages Stage 1 - Calculate Retirement Needs Collect from the user their total monthly retirement income target, the number of years they hope to be retired, and the annual rate of return (growth) their investments will receive (how much the unspent portion grows). It is generally recommended retires choose safer (lower rates of return) investments after they retire to avoid "negative growth Calculate and print how much monthly income will be necessary from their investments, and the lump sum needed at retirement to provide this income for the number of years they indicated they wish to be retired. You can calculate the lump-sum required to make "n" monthly withdrawals, of "c" dollars, if the account earns *** monthly interest with the following formula: Social Security does not scale linearly with earnings: the more you earn the lower the PERCENTAGE (not actual dollar amount of Income will be replaced by sodal security. It has a minimum ($850) and maximum ($3100) monthly pay out -high income earners tend to have a low percentage of their retirement from social security. It was intended to be a safety net. 1- (1 + i)- lum sum = c. A typical run of stage one might look like Enter your pre-retirement final monthly income: 8000 You will need to draw $6,800.00 every month from your investments to achieve this incone Enter your expected annual retirement account return (typically .03-.07): .05 Enter how many years you plan to be retired (typically 15 - 30): 25 You will need $1,163,208.32 in your investment accounts to achieve your goal Stage 2. Calculate Investment Outcomes Collect from the user their planned monthly retirement investment, the number of years they plan to work until retirement, and the annual rate of return (growth) their investments will receive. Calculate their investment account balance when they are done working. You can calculate the account balance based on "n" monthly deposits, of "c" dollars, if the account earns "" monthly interest with the following formula: account balance cu (1+)"-1 Print out the calculated account balance. If the account balance is at least as large the retirement lump-sum calculated in Stags 1. print "Congratulations you will achieve your income goal". If the account balance is too low and the user is planning to have worked longer than they plan to be retired, print "You will need to save more to reach your goal." In all other cases, print ""'You will need to work longer to reach your goal". Stage 3: Account Details Prompt the user to see if they want to see details. If the user's response starts with an upper or lower case "Y", display one of two statements depending on appropriate to whether or not they have enough money to meet their goals of course, your numbers may be different depending on your inputs. Either For 25 years in retirement, you want $8,000.00 in monthly income with $6,800.00 coming from investments You saved $800.00 monthly for 40 years This results in a retirement account balance surplus of $429,984.27. Or For 25 years in retirement, you want $8,000.00 in monthly income with $6,800.00 coming from investments You saved $500.00 monthly for 40 years This results in a retirement account balance deficit of $167,462.95. ASSIGNMENT LOGISTICS Additional requirements: 1. Any "years" value must be printed as an integer, dollar amounts should be printed rounded to the nearest cent. 2. You must program the formulas we give you-even if you know of or find other formulas 3. You must provide prompts for your "input()'s. We are not going to read the code to figure out what values you want in what order. 4. You must submit a py file, which runs from the command line using "pytho] Section: Description: This is called a doc-string and loosely follows the current python standard for file documentation As a minimum identify where each "Stage" of the program begins YOU ARE STRONGLY CAUTIONED AGAINST USING JUPYTER NOTEBOOK FOR THIS ASSIGNMENT: Ipynb files will receive a 0; the "Export notebook" function in Jupyter is known to be buery (ie it may not produce runnable code). What to turn in: Upload a .py file. It must run from the command line using a Python 3 interpreter (the version in the lab). For Americans entering the work force in the 2020s, most of their retirement income will be a from a the money they have invested over their working career. A critical question for all workers is how much money they need to save each month to have enough money to retire. We are going to model this. Our model is going to make a few assumptions- 1. The user will need 100% of their pre-retirement income 2. Social Security will provide 15% of this value, 85% will come from Investments! 3. The user will invest a fixed amount each month until they retire-at which point they stop investing new money (no new monthly investments) 4. The user will withdraw a fixed amount from your retirement account each month 5. The model will ignore Inflation - this may substantially underestimate how much needs to be saved 6. Monthly interest rate= annual interest rate / 12-this can be a little off depending on the type of interest This type of investment approximates an annuity strategy 3. 3. The program can be worked in 3-stages Stage 1 - Calculate Retirement Needs Collect from the user their total monthly retirement income target, the number of years they hope to be retired, and the annual rate of return (growth) their investments will receive (how much the unspent portion grows). It is generally recommended retires choose safer (lower rates of return) investments after they retire to avoid "negative growth Calculate and print how much monthly income will be necessary from their investments, and the lump sum needed at retirement to provide this income for the number of years they indicated they wish to be retired. You can calculate the lump-sum required to make "n" monthly withdrawals, of "c" dollars, if the account earns *** monthly interest with the following formula: Social Security does not scale linearly with earnings: the more you earn the lower the PERCENTAGE (not actual dollar amount of Income will be replaced by sodal security. It has a minimum ($850) and maximum ($3100) monthly pay out -high income earners tend to have a low percentage of their retirement from social security. It was intended to be a safety net. 1- (1 + i)- lum sum = c. A typical run of stage one might look like Enter your pre-retirement final monthly income: 8000 You will need to draw $6,800.00 every month from your investments to achieve this incone Enter your expected annual retirement account return (typically .03-.07): .05 Enter how many years you plan to be retired (typically 15 - 30): 25 You will need $1,163,208.32 in your investment accounts to achieve your goal Stage 2. Calculate Investment Outcomes Collect from the user their planned monthly retirement investment, the number of years they plan to work until retirement, and the annual rate of return (growth) their investments will receive. Calculate their investment account balance when they are done working. You can calculate the account balance based on "n" monthly deposits, of "c" dollars, if the account earns "" monthly interest with the following formula: account balance cu (1+)"-1 Print out the calculated account balance. If the account balance is at least as large the retirement lump-sum calculated in Stags 1. print "Congratulations you will achieve your income goal". If the account balance is too low and the user is planning to have worked longer than they plan to be retired, print "You will need to save more to reach your goal." In all other cases, print ""'You will need to work longer to reach your goal". Stage 3: Account Details Prompt the user to see if they want to see details. If the user's response starts with an upper or lower case "Y", display one of two statements depending on appropriate to whether or not they have enough money to meet their goals of course, your numbers may be different depending on your inputs. Either For 25 years in retirement, you want $8,000.00 in monthly income with $6,800.00 coming from investments You saved $800.00 monthly for 40 years This results in a retirement account balance surplus of $429,984.27. Or For 25 years in retirement, you want $8,000.00 in monthly income with $6,800.00 coming from investments You saved $500.00 monthly for 40 years This results in a retirement account balance deficit of $167,462.95. ASSIGNMENT LOGISTICS Additional requirements: 1. Any "years" value must be printed as an integer, dollar amounts should be printed rounded to the nearest cent. 2. You must program the formulas we give you-even if you know of or find other formulas 3. You must provide prompts for your "input()'s. We are not going to read the code to figure out what values you want in what order. 4. You must submit a py file, which runs from the command line using "pytho] Section: Description: This is called a doc-string and loosely follows the current python standard for file documentation As a minimum identify where each "Stage" of the program begins YOU ARE STRONGLY CAUTIONED AGAINST USING JUPYTER NOTEBOOK FOR THIS ASSIGNMENT: Ipynb files will receive a 0; the "Export notebook" function in Jupyter is known to be buery (ie it may not produce runnable code). What to turn in: Upload a .py file. It must run from the command line using a Python 3 interpreter (the version in the lab)