fix(r-1.4_scratch.py): corrected operation to stop with value of n being positive
This commit is contained in:
@@ -11,7 +11,7 @@ sum of the squares of all the positive integers smaller than n.
|
|||||||
|
|
||||||
def squares_sum(n):
|
def squares_sum(n):
|
||||||
list = []
|
list = []
|
||||||
while n >= 1:
|
while n >= 2:
|
||||||
n = n - 1
|
n = n - 1
|
||||||
print(n)
|
print(n)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user