From b82135d1ae2646f138ef2aecf838987180d128ed Mon Sep 17 00:00:00 2001 From: baphim <269010393+baphim@users.noreply.github.com> Date: Fri, 4 Sep 2026 22:51:18 -0400 Subject: [PATCH] feat(r-1.4_scratch.py): assigned sum of squares to a var and added input prompt --- lab-01/r-1.4_scratch.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lab-01/r-1.4_scratch.py b/lab-01/r-1.4_scratch.py index fa379d0..930f6c9 100644 --- a/lab-01/r-1.4_scratch.py +++ b/lab-01/r-1.4_scratch.py @@ -16,9 +16,8 @@ def squares_sum(n): list.append(n) if n == 1: square_list = [m*m for m in list] - print(square_list) + squares = sum(square_list) + print(squares) - - -squares_sum(5) \ No newline at end of file +squares_sum(int(input("Enter a positive integer: "))) \ No newline at end of file