Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Licence CC BY-NC-ND Thierry Parmentelat & Arnaud Legout Inria - UCA

construire un tableau 100i+10j100 * i + 10 * j

On vous demande d’écrire une fonction hundreds qui crée un tableau numpy.

La fonction prend en argument:

Le résultat doit être un tableau de taille lines x columns, composé d’entiers, et on veut qu’en une case de coordonnées (i, j) la valeur du tableau soit égale à

result[i,j]=100i+10j+offsetresult[i, j] = 100 * i + 10 * j + offset
import numpy as np
from corrections.exo_hundreds import exo_hundreds

# voici deux exemples pour la fonction hundreds
exo_hundreds.example()
Loading...
# à vous de jouer
def hundreds(lines, columns, offset):
    return "votre code"
# pour corriger votre code
exo_hundreds.correction(hundreds)
Loading...

Plusieurs angles possibles