ch04_algorithme13.py

Created by manuel-eleve-1ret-indice2019

Created on November 05, 2019

392 Bytes


def banlieue(seuil):
    b=100000
    n = 0
    while b < seuil:
        b = b*1.03
        n = n+1
    return(n)

def centre(seuil):
    c=150000
    n = 0
    while c > seuil:
        c = c*0.98
        n = n+1
    return(n)

def comparaison():
    b=100000
    c=150000
    n = 0
    while c > b:
        b = b*1.03
        c = c*0.98
        n = n+1
    return(n)