id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs112fall2015 > yearsUntilDoubled
prev  |  next  |  chance

Write a function yearsUntilDoubled(amount, rate) that returns the number of years until amount is doubled when it earns the given rate of interest, compounded annually. Use a while loop. Assume that rate is a number between 0 and 1


yearsUntilDoubled(1000, 0.03) → 24
yearsUntilDoubled(1000, 0.05) → 15
yearsUntilDoubled(500, 0.07) → 11

...Save, Compile, Run (ctrl-enter)

def yearsUntilDoubled(amount, rate):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy