Ajout du tp de python et regex

This commit is contained in:
2025-11-14 14:17:17 +01:00
parent 522b01ef35
commit b3721a511b
5 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#!/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)