Conditions | 2 |
Total Lines | 11 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """ |
||
48 | def solve(): |
||
49 | """ Compute the answer to Project Euler's problem #6 """ |
||
50 | upper_bound = 100 |
||
51 | sum_of_squares = 0 |
||
52 | square_of_sums = 0 |
||
53 | for i in range(1, upper_bound + 1): |
||
54 | sum_of_squares += i * i |
||
55 | square_of_sums += i |
||
56 | square_of_sums = square_of_sums * square_of_sums |
||
57 | answer = int(fabs(square_of_sums - sum_of_squares)) |
||
58 | return answer |
||
59 | |||
62 |
This check looks for lines that are too long. You can specify the maximum line length.