You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 
 

13 lines
243 B

  1. # Exercice: remplacer n, s et x avec de meilleurs noms
  2. def calcule_moyenne(scores):
  3. n = len(scores)
  4. s = 0
  5. for x in scores:
  6. s = s + x
  7. return s / n
  8. scores = [2, 3, 5, 4]
  9. moyenne = calcule_moyenne(scores)
  10. print(moyenne)