From 2b55db64b56b2122c7f4e82bef28c1c39689e5a1 Mon Sep 17 00:00:00 2001 From: Daniel <59575049+lemoentjiez@users.noreply.github.com> Date: Fri, 9 Dec 2022 12:28:58 +0200 Subject: [PATCH] Update fifth.py --- LabPSA_2/fifth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LabPSA_2/fifth.py b/LabPSA_2/fifth.py index 8380cb9..c4d9c96 100644 --- a/LabPSA_2/fifth.py +++ b/LabPSA_2/fifth.py @@ -4,8 +4,7 @@ from numpy import sqrt real = 0 positive = 0 for _ in range(10000): - b = random.uniform(-1, 1) - c = random.uniform(-1, 1) + c, b = random.uniform(-1, 1), random.uniform(-1, 1) delta = b ** 2 - 4*c if delta > 0: real += 1 @@ -16,4 +15,3 @@ for _ in range(10000): print(real/10000) print(positive/10000) -