4.5. For: Somme des cubes#

Consigne#

Pour un entier N donné en entrée, calculer la somme suivante :

1³ + 2³ + … + N³

Exemple d’entrée#

3

Exemple de sortie#

36

Aide#

https://rtavenar.github.io/poly_python/content/struct.html#boucles-for

https://docs.python.org/fr/3/reference/compound_stmts.html#for

Codez votre solution ci-dessous#

[splashscreen] enabled = false # Read an integer: # a = int(input()) # Print a value: # print(a) from js import document as _DOC def clear_term(): ter = _DOC.getElementById("my-terminal").firstChild ter.innerHTML = ''