Solution Exercice 71: algorithme python permettant de translater une liste

Exercice 71

Ecrire un algorithme Python qui transforme une liste d'entiers L = [n1 , n2, n3, ... , np] en ajoutant 1 au premier élément, 2 au deuxième élément, 3 au troisième élément,... , p au pème élément. L'algorithme doit renvoyer à la fin la liste [n1 + 1 , n2 + 2, n3 + 3, ... , np + p].

Solution









 

Younes Derfoufi
CRMEF OUJDA

1 thought on “Solution Exercice 71: algorithme python permettant de translater une liste

Leave a Reply

Your email address will not be published. Required fields are marked *