You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pour le défi DF8PT, [EP24] - 01.2, je pense avoir mis la bonne réponse et pourtant je ne passe pas le test 1 !
Voici mon code :
def echange(tab, i, j):
'''Echange les éléments d'indice i et j dans le tableau tab.'''
temp = tab[i]
tab[i] = tab[j]
tab[j] = temp
def tri_selection(tab):
'''Trie le tableau tab dans l'ordre croissant
par la méthode du tri par sélection.'''
N = len(tab)
for k in range(N):
imin = k
for i in range(k+1, N):
if tab[i] < tab[imin]:
imin = i
echange(tab, imin, k)
The text was updated successfully, but these errors were encountered:
Bonjour,
Pour le défi DF8PT, [EP24] - 01.2, je pense avoir mis la bonne réponse et pourtant je ne passe pas le test 1 !
Voici mon code :
The text was updated successfully, but these errors were encountered: