Question: Exercise 1.52 (This problem is modified from [4]) In the 1999 movie Office Space, a character creates a program that takes fractions of cents that

 Exercise 1.52 (This problem is modified from [4]) In the 1999

Exercise 1.52 (This problem is modified from [4]) In the 1999 movie Office Space, a character creates a program that takes fractions of cents that are truncated in a bank's transactions and deposits them to his own account. This is idea has been attempted in the past and now banks look for this sort of thing. In this problem you will build a simulation of the program to see how long it takes to become a millionaire Assumptions: Assume that you have access to 50,000 bank accounts. Assume that the account balances are uniformly distributed between $100 and $100,000. Assume that the annual interest rate on the accounts is 5% and the interest is compounded daily and added to the accounts, except that fractions of cents are truncated. Assume that your illegal account initially has a $0 balance. Your Tasks: a. Explain what the code below does. import numpy as np accounts - 100 + (100000-100). np.random.rand(50000, 1); accounts - np.floor(100*accounts)/100; b. By hand (no computer) write the mathematical steps necessary to increase the accounts by (5/365)% per day, truncate the accounts to the nearest penny, and add the truncated amount into an account titled illegal". c. Write code to complete your plan from part (b). d. Using a while loop, Iterate over your code until the illegal account has accumulated $1,000,000 How long does it take

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!