feat(r-1.4.py): assembled completed deliverable and fixed reassignment of built in list class
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
def squares_sum(n):
|
||||
smaller_list = []
|
||||
while n >= 2:
|
||||
n = n - 1
|
||||
smaller_list.append(n)
|
||||
if n == 1:
|
||||
square_list = [m*m for m in smaller_list]
|
||||
squares = sum(square_list)
|
||||
print(squares)
|
||||
|
||||
|
||||
squares_sum(int(input("Enter a positive integer: ")))
|
||||
|
||||
Reference in New Issue
Block a user