Spaces:
Running
Running
Upload code.txt
Browse files
code.txt
CHANGED
|
@@ -1372,7 +1372,7 @@ L’algorithme demandé est une recherche dichotomique récursive.
|
|
| 1372 |
Exemples :
|
| 1373 |
>>> chercher([1, 5, 6, 9, 12], 7)
|
| 1374 |
>>> chercher([1, 5, 6, 9, 12], 9)
|
| 1375 |
-
|
| 1376 |
>>> chercher([1, 5, 6, 9, 12], 6)
|
| 1377 |
2
|
| 1378 |
;;;
|
|
@@ -1382,7 +1382,7 @@ if chercher([1, 5, 6, 9, 12], 7) == None:
|
|
| 1382 |
c += 1
|
| 1383 |
else :
|
| 1384 |
print("Test 1 : échec")
|
| 1385 |
-
if chercher([1, 5, 6, 9, 12], 9) ==
|
| 1386 |
print("Test 2 : OK")
|
| 1387 |
c += 1
|
| 1388 |
else :
|
|
|
|
| 1372 |
Exemples :
|
| 1373 |
>>> chercher([1, 5, 6, 9, 12], 7)
|
| 1374 |
>>> chercher([1, 5, 6, 9, 12], 9)
|
| 1375 |
+
3
|
| 1376 |
>>> chercher([1, 5, 6, 9, 12], 6)
|
| 1377 |
2
|
| 1378 |
;;;
|
|
|
|
| 1382 |
c += 1
|
| 1383 |
else :
|
| 1384 |
print("Test 1 : échec")
|
| 1385 |
+
if chercher([1, 5, 6, 9, 12], 9) == 3:
|
| 1386 |
print("Test 2 : OK")
|
| 1387 |
c += 1
|
| 1388 |
else :
|