suppression ancien fichier cours Pile & File, et ajout des sujets bacs NSI
This commit is contained in:
16
Sujet_bac/Pratique/BNS_2025/25-NSI-4/sujet-4.py
Normal file
16
Sujet_bac/Pratique/BNS_2025/25-NSI-4/sujet-4.py
Normal file
@@ -0,0 +1,16 @@
|
||||
def echange(tab, i, j):
|
||||
'''Echange les éléments d'indice i et j dans le tableau tab.'''
|
||||
temp = ...
|
||||
tab[i] = ...
|
||||
tab[j] = ...
|
||||
|
||||
def tri_bulles(tab):
|
||||
'''Trie le tableau tab dans l'ordre croissant
|
||||
par la méthode du tri à bulles.'''
|
||||
n = len(tab)
|
||||
for i in range(...):
|
||||
for j in range(...):
|
||||
if ... > ...:
|
||||
echange(tab, j, ...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user