suppression ancien fichier cours Pile & File, et ajout des sujets bacs NSI

This commit is contained in:
2026-03-25 21:13:05 +01:00
parent 0a16b5fbb3
commit c6ee9b49f4
167 changed files with 1103 additions and 158 deletions

View File

@@ -0,0 +1,15 @@
def chercher(tab, x, i, j):
'''Renvoie l'indice de x dans tab, si x est dans tab,
None sinon.
On suppose que tab est trié dans l'ordre croissant.'''
if i > j:
return None
m = (i + j) // ...
if ... < x:
return chercher(tab, x, ... , ...)
elif tab[m] > x:
return chercher(tab, x, ... , ...)
else:
return ...