emprunt_amort_ct.py

Created by thierry-barry

Created on March 06, 2019

421 Bytes

Affiche le tableau de remboursement d’un emprunt dans le cas d’un amortissement constant. Saisir le montant du capital emprunté, le taux d’intérêt (5 pour 5%, par exemple) et la durée en année.


def e_amort_ct(k,i,n):
  list1=[]
  list2=[]
  list3=[]
  amort=round(k/n,2)
  j=0
  sint=0
  while j<n:
    interet=round(k*i/100,2)
    sint=sint+interet
    annuite=amort+interet
    list1.append(k)
    list2.append(interet)
    list3.append(annuite)
    k=round(k-amort,2)
    j=j+1
  for l in range(n):
    print(list1[l],'!',list2[l],'!',amort,'!',list3[l])
  print ('cout du credit :',sint)

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.