Skip to content

Commit 6c8a214

Browse files
committed
Commented doctest that were causing slowness at Travis.
1 parent 176e801 commit 6c8a214

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

project_euler/problem_09/sol1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def solution():
1818
2. a**2 + b**2 = c**2
1919
3. a + b + c = 1000
2020
21-
>>> solution()
22-
31875000
21+
#>>> solution()
22+
#31875000
2323
"""
2424
for a in range(300):
2525
for b in range(400):

project_euler/problem_09/sol3.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def solution():
2121
1. a**2 + b**2 = c**2
2222
2. a + b + c = 1000
2323
24-
>>> solution()
25-
31875000
24+
#>>> solution()
25+
#31875000
2626
"""
2727
return [
2828
a * b * c

project_euler/problem_10/sol1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def sum_of_primes(n):
4242
def solution(n):
4343
"""Returns the sum of all the primes below n.
4444
45-
>>> solution(2000000)
46-
142913828922
45+
#>>> solution(2000000)
46+
#142913828922
4747
>>> solution(1000)
4848
76127
4949
>>> solution(5000)

project_euler/problem_10/sol2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def prime_generator():
3131
def solution(n):
3232
"""Returns the sum of all the primes below n.
3333
34-
>>> solution(2000000)
35-
142913828922
34+
#>>> solution(2000000)
35+
#142913828922
3636
>>> solution(1000)
3737
76127
3838
>>> solution(5000)

project_euler/problem_12/sol1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def solution():
4545
"""Returns the value of the first triangle number to have over five hundred
4646
divisors.
4747
48-
>>> solution()
49-
76576500
48+
#>>> solution()
49+
#76576500
5050
"""
5151
tNum = 1
5252
i = 1

project_euler/problem_12/sol2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def solution():
3939
"""Returns the value of the first triangle number to have over five hundred
4040
divisors.
4141
42-
>>> solution()
43-
76576500
42+
#>>> solution()
43+
#76576500
4444
"""
4545
return next(
4646
i for i in triangle_number_generator() if count_divisors(i) > 500

project_euler/problem_14/sol1.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def solution(n):
3030
n → n/2 (n is even)
3131
n → 3n + 1 (n is odd)
3232
33-
>>> solution(1000000)
34-
{'counter': 525, 'largest_number': 837799}
33+
#>>> solution(1000000)
34+
#{'counter': 525, 'largest_number': 837799}
3535
>>> solution(200)
3636
{'counter': 125, 'largest_number': 171}
3737
>>> solution(5000)

project_euler/problem_14/sol2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def collatz_sequence(n):
4747
def solution(n):
4848
"""Returns the number under n that generates the longest Collatz sequence.
4949
50-
>>> solution(1000000)
51-
{'counter': 525, 'largest_number': 837799}
50+
#>>> solution(1000000)
51+
#{'counter': 525, 'largest_number': 837799}
5252
>>> solution(200)
5353
{'counter': 125, 'largest_number': 171}
5454
>>> solution(5000)

0 commit comments

Comments
 (0)