From 7606f6e7bef8878631b8be9e0543a3a5231f9511 Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Tue, 24 Feb 2015 11:06:43 +0100 Subject: [PATCH] TP4 dicho inversion --- S2/TP4/tp4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S2/TP4/tp4.py b/S2/TP4/tp4.py index 01f94f7..6edebd6 100644 --- a/S2/TP4/tp4.py +++ b/S2/TP4/tp4.py @@ -74,7 +74,7 @@ def dicho(l, a, b, x): # Geoffrey assert(type(a) == type(b) == int), "a et b doivent être des ints" assert(0 <= a < b <= len(l)), "Il faut que 0 ≤ a < b ≤ len(l)" - a = d + d = a f = b - 1 while d < f: m = (d+f)//2