#!/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
|
|
<<<<<<< HEAD
|
|
#date :23-09-2019 - 11:20
|
|
=======
|
|
#date :22-09-2019 - 14:10
|
|
>>>>>>> Add assignments
|
|
#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:
|
|
<<<<<<< HEAD
|
|
s = s +(number*number)
|
|
print(s)
|
|
|
|
kwadraten_som([4,5,3,-81])
|
|
=======
|
|
s = s + (number*number)
|
|
print(s)
|
|
kwadraten_som([4, 5, 3, -81 ])
|
|
>>>>>>> Add assignments
|