Sollicitatievraag bij Kepler Group

How would the python language for this look like?