31 lines
420 B
Python
31 lines
420 B
Python
#!/usr/bin/python3
|
|
|
|
tableau = []
|
|
min = 0
|
|
max = 0
|
|
cumul = 0
|
|
|
|
print("entrer 5 chiffres")
|
|
for i in range(5):
|
|
nombre = float(input(f"Chiffre {i+1} : "))
|
|
tableau.append(nombre)
|
|
|
|
|
|
for l in tableau:
|
|
if l < min:
|
|
min = l
|
|
if l > max:
|
|
max = l
|
|
cumul = cumul + l
|
|
|
|
for l
|
|
moyenne = cumul / 5
|
|
|
|
|
|
for l in tableau:
|
|
print(tableau[i])
|
|
|
|
print("le plus petit:", min)
|
|
print("le plus grand:", max)
|
|
print("la moyenne", moyenne)
|