From e4f43bdf2ee650d04abc2a2136f77a2f08648630 Mon Sep 17 00:00:00 2001 From: fbury <florian.bury@cern.ch> Date: Tue, 29 Sep 2020 09:42:49 +0200 Subject: [PATCH] Few corrections --- Chapter_2/ex3.py | 4 ++-- Chapter_2/ex5_sol1.py | 1 - Chapter_2/ex5_sol2.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Chapter_2/ex3.py b/Chapter_2/ex3.py index 0b2de1c..ba08083 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 f942a87..b6c78cc 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 6a28481..cfe5c8a 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*"-") -- GitLab