Warning! The page was not fully loaded, probably because of a network issue. It could be that not all functionalities work as expected. Please try reloading the page.
Drop links or images here to add them to the editor.
Cijfersom
Schrijf een functie cijfersom(n) die de som van de cijfers van een natuurlijk getal n returnt. Programmeer dit recursief.
Voorbeelden
print(cijfersom(1234))print(cijfersom(2030))
10
5
Tip
Floor division en modulo zijn hier bijzonder nuttig.