On Sep 2, 1:37 pm, Baba wrote:
> level: beginner
In this economy, simulating the value of retirement funds with
bisection is easy. Look:
def retirement_fund_value(n_years,initial_value):
for i in xrange(n_years):
value /= 2 # <- bisect value of fund
return value
Carl Banks
--
On 03/09/2010 09:06, Baba wrote:
On Sep 2, 11:10 pm, MRAB wrote:
Why are you saving 'fund' in SavingsRecord if you're returning just the
last and discarding others? Basically you're returning the final value
of fund.
Hi MRAB
ok i agree that this is not be ideal. I should shorten this to ONL
On Sep 2, 11:10 pm, MRAB wrote:
>
> Why are you saving 'fund' in SavingsRecord if you're returning just the
> last and discarding others? Basically you're returning the final value
> of fund.
Hi MRAB
ok i agree that this is not be ideal. I should shorten this to ONLY
return SavingsRecord[-1]
>
On 02/09/2010 21:37, Baba wrote:
level: beginner
exercise source:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset4.pdf
Problem 4
Can my code be optimised?
I think my approach is correct but
level: beginner
exercise source:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset4.pdf
Problem 4
Can my code be optimised?
I think my approach is correct but i am hesitant about the initial max