Skip to content

Commit 0c9b1b8

Browse files
committed
Fix typo
1 parent 5d02103 commit 0c9b1b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

project_euler/problem_058/sol1.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,22 @@
3535
"""
3636

3737

38-
def isprime(d: int) -> int:
38+
def isprime(n: int) -> int:
3939
"""
40-
returns whether the given digit is prime or not
40+
returns whether the given number is prime or not
4141
>>> isprime(1)
4242
0
4343
>>> isprime(17)
4444
1
4545
>>> isprime(10000)
4646
0
4747
"""
48-
if d == 1:
48+
if n == 1:
4949
return 0
5050

5151
i = 2
52-
while i * i <= d:
53-
if d % i == 0:
52+
while i * i <= n:
53+
if n % i == 0:
5454
return 0
5555
i = i + 1
5656
return 1

0 commit comments

Comments
 (0)