teslariu

while2

May 30th, 2022
1,009
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. Hacer un script que calcule el promedio de una lista de notas, la nota
  5. mas alta y la mas baja
  6. """
  7. notas = [6,7,8,9,4,10,10,9,9,8,9,10,4,6,7]
  8. print(f"El promedio es {sum(notas)/len(notas):.2f}")
  9. print(f"La nota mas alta es {max(notas)}")
  10. print(f"La nota mas baja es {min(notas)}")
Advertisement
Add Comment
Please, Sign In to add comment