diff --git a/Chapter_2/ex3.py b/Chapter_2/ex3.py index 0b2de1c0865d29c90ef327072fd0707175243580..ba08083dfff44560bfef74978e9610d7402e435e 100644 --- a/Chapter_2/ex3.py +++ b/Chapter_2/ex3.py @@ -1,8 +1,8 @@ import math -step = 1 +step = 1. min_step = 1e-10 -x = 0 +x = 0. while step >= min_step: while math.exp(-0.5*x*x) > 0: diff --git a/Chapter_2/ex5_sol1.py b/Chapter_2/ex5_sol1.py index f942a870152055b64d2190a14451aa432dbdd43f..b6c78cc727492d81aba8c754bc8787261e94a90d 100644 --- a/Chapter_2/ex5_sol1.py +++ b/Chapter_2/ex5_sol1.py @@ -20,7 +20,6 @@ while lineId < n_lines: colId = 0 txt_to_print = "|" while colId < n_col: - t = 0 filled = False x = colId - 0.5 while x < colId + 0.5: # Boucle sur x pour avoir une ligne continue diff --git a/Chapter_2/ex5_sol2.py b/Chapter_2/ex5_sol2.py index 6a28481e3c64e88b215cf5e7317d007ea90a0966..cfe5c8aeedcf9afce015ad30175710b0478711c8 100644 --- a/Chapter_2/ex5_sol2.py +++ b/Chapter_2/ex5_sol2.py @@ -35,5 +35,5 @@ while lineId < n_lines: colId+=1 lineId+=1 - print txt_to_print+"|" + print (txt_to_print+"|") print(" "+n_col*"-")