Skip to content

Commit c25cce7

Browse files
committed
Spacing changes.
1 parent 5a5a37b commit c25cce7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

hashes/hash-test.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ def is_prime(n):
4040
d+=1 [or 2]
4141
What condition will d satisfy after the while loop if n is prime?
4242
"""
43-
Dmax = scipy.sqrt(n)
43+
d_max = scipy.sqrt(n)
44+
4445
if n == 2:
4546
return True
46-
if n %2 == 0:
47+
if n % 2 == 0:
4748
return False
49+
4850
d = 3
49-
while n % d != 0 and d <= Dmax:
51+
while n % d != 0 and d <= d_max:
5052
d += 2
51-
return d > Dmax
53+
54+
return d > d_max
5255

5356

5457
def first_prime_greater_than(min):

0 commit comments

Comments
 (0)