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.
 

20 lines
570 B

#!/usr/bin/env python3
#title :5-5.py
#description :Opdracht 5.5 - Functie met list-parameter en for-loop
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :23-09-2019 - 11:20
#version :0.1
#usage :python3 5-5.py
#notes :
#python_version :3.7.4
#==============================================================================
def kwadraten_som(grondgetallen):
s = 0
for number in grondgetallen:
if number > 0:
s = s +(number*number)
print(s)
kwadraten_som([4,5,3,-81])