ps4a how would you improve this code? Thanks guys! http://pastebin.com/ib8AeRCp
Your code is actually wrong, or at least returning the wrong values; read ps4.py that came together with the .pdf, and you will see that it comes with some test cases. Look at your code output for salary = 10000, save =10, gR = 15, years = 5 : in year 0 your account is at 100000 in year 1 your account is at 1700000 in year 2 your account is at 27300000 in year 3 your account is at 436900000 in year 4 your account is at 6990500000 and the expected values for # Output should have values close to: # [1000.0, 2150.0, 3472.5, 4993.375, 6742.3812499999995] # TODO: Add more test cases here. Another thing, the assignment says that your code should return a list with the values for the savings. This also makes easier to see and debug. Try to fix it and post again if you are stumped :-). Good luck!
Join our real-time social learning platform and learn together with your friends!