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.

30 lines
777 B

преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
преди 5 години
  1. #!/usr/bin/env python3
  2. #title :5-5.py
  3. #description :Opdracht 5.5 - Functie met list-parameter en for-loop
  4. #author :Marcel Haazen
  5. #email :marcel@haazen.xyz
  6. <<<<<<< HEAD
  7. #date :23-09-2019 - 11:20
  8. =======
  9. #date :22-09-2019 - 14:10
  10. >>>>>>> Add assignments
  11. #version :0.1
  12. #usage :python3 5-5.py
  13. #notes :
  14. #python_version :3.7.4
  15. #==============================================================================
  16. def kwadraten_som(grondgetallen):
  17. s = 0
  18. for number in grondgetallen:
  19. if number > 0:
  20. <<<<<<< HEAD
  21. s = s +(number*number)
  22. print(s)
  23. kwadraten_som([4,5,3,-81])
  24. =======
  25. s = s + (number*number)
  26. print(s)
  27. kwadraten_som([4, 5, 3, -81 ])
  28. >>>>>>> Add assignments