partie5_ex85.py

Created by cahier-indice-algo-1gen

Created on April 22, 2022

414 Bytes


def defauts(production):
    repartition_chaines = [0.5, 0.3, 0.2]
    prod_chaines = [production * repartition_chaines[k] for k in range(3)]
    pourcentage_defauts = [0.01, 0.03, 0.02]
    nombre_defauts = [prod_chaines[k] * pourcentage_defauts[k] for k in range(3)]
    return nombre_defauts
    
def proportion(production):
    liste = defauts(production)
    return sum(liste) / production