Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. cuantosn=int(input("Cuantos numero vas a introducir? "))
  2.  
  3. if cuantosn <= 0:
  4. print("Tienes que introducir al menos un numero loco.")
  5. else:
  6. execucions=1
  7. suma=0
  8. while execucions <= cuantosn:
  9. valor=float(input("Venga dame un numero! "))
  10. suma= suma+ valor
  11. execucions= execucions + 1
  12. print("La suma total dels numeros es", suma)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement