dm1_734_2019.py

Created by frederic-junier

Created on October 06, 2019

257 Bytes

Correction du DM 1 Retourne le plus petit entier n tel que l’amortissement total dépasse 100000 la somme empruntée. Cet entier représente le nombre de mensualités nécessaire pour rembourser l’emprunt.


def seuilBanqueA():
  n = 1
  while 200000 * (1.0025 ** n  - 1) <= 100000:
    n = n + 1
  return n
  
def seuilBanqueAV2():
  n = 1
  a = 500
  sa = a
  while sa <= 100000:
    a = a * 1.0025
    sa = sa + a 
    n = n + 1
  return n
  

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.