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.

19 lines
549 B

преди 5 години
  1. #!/usr/bin/env python3
  2. #title :8-1.py
  3. #description :Opdracht 8.1 - While-loop & numbers
  4. #author :Marcel Haazen
  5. #email :marcel@haazen.xyz
  6. #date :28-10-2019 - 13:10
  7. #version :0.1
  8. #usage :python3 8-1.py
  9. #notes :
  10. #python_version :3.7.3
  11. #==============================================================================
  12. nl = []
  13. n = None
  14. i = 0
  15. while n != 0:
  16. n = int(input("Voer een nummer in: "))
  17. nl.append(n)
  18. i += 1
  19. print("er zijn", i-1 ,"getallen ingevoerd, de som is:", sum(nl))