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) -