Question: What is the correct python pseudocode for this? # Retirement Planning Tool Pseudocode # Get user input years _ to _ retirement = input (
What is the correct python pseudocode for this?
# Retirement Planning Tool Pseudocode
# Get user input
yearstoretirement inputEnter years left in your working career:
annualsavings inputEnter annual amount you can save:
# Initialize variables
savings
retirementyears
interestrate
annualspending
# Allow user to change retirement years
while True:
changeyears inputDo you want to change retirement years? yn:
if changeyears.lowery:
retirementyears inputEnter new retirement years:
else:
break
# Calculate savings during working years
for year in rangeyearstoretirement:
savings annualsavings
savings interestrate
# Print savings schedule
printRetirement Savings Schedule:"
printYear Starting Balance Interest Earned Spending Ending Balance"
for year in range retirementyears :
interestearned savings interestrate
savings interestearned
savings annualspending
printfyearsavings:finterestearned:fannualspending:fsavings:f
if savings :
printSavings depleted."
break
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
