Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Individual Retirement Accounts Money earned in an ordinary savings account is subject to federal,state,and local income taxes. However , a special type of retirement savings

Individual Retirement Accounts Money earned in an ordinary savings account is subject to federal,state,and local income taxes. However , a special type of retirement savings account,called a traditional individual Retirement account (traditional IRA), allows these taxes to be deferred until after retirement. IRAs are highly touted by financial planners. The purpose of this programming project is to show the value of starting an IRA early. Early and Larry each begin full-time jobs in January 2015 and plan to retire in January 2063 after working for 48yrd. Assume that any money they deposit into IRAs earns 4% interest compounded annually. Early opens a traditional IRA account immediately and deposits $5,000 into his account at the end of each year for fifteen years. After that he plans to make no further deposits and just let the money earn interest. Larry plans to wait fifteen years before opening his traditional IRA and then deposit $5,000 into the account at the end of each year until he retires. Write a program that calculates the amount of money each person has deposited into his account and the amount of money in each account upon retirement. 1.Complete your program design(flow chart, pseudocode, or other). 2.Save as .pyfile def compound_interest(principal_amt, rate_of_int, times_per_year, years): rn = 1 + (rate_of_int / times_per_year) nt = times_per_year * years return principal_amt * pow(rn, nt) principal = 5000 print("\t\tAMOUNTS DEPOSITED") earl = principal * 15 larry = principal * 33 print("Earl: $%.2f\t\t\tLarry : $%.2f" %(earl,larry)) result = 0 for x in range(15): result = result + principal result = compound_interest(result, 0.04, 1, 1) result = compound_interest(result, 0.04, 1, 32) result1 = 0 for x in range(32): result1 = result1 + principal result1 = compound_interest(result1, 0.04, 1, 1) result1 = result1 + principal print("\tAMOUNTS IN IRA UPON RETIREMENT") print("Earl: $%.2f\t\tLarry : $%.2f" % (result,result1)) I keep getting an error. expected an indent block

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago