Update fifth.py
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user