From ad608ade664c5bd9b18a48a2a76bacaf572511b6 Mon Sep 17 00:00:00 2001 From: baphim <269010393+baphim@users.noreply.github.com> Date: Fri, 4 Sep 2026 22:06:39 -0400 Subject: [PATCH] feat(r-1.4_scratch.py): created while loop reducing value of n to 0 --- lab-01/r-1.4_scratch.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lab-01/r-1.4_scratch.py b/lab-01/r-1.4_scratch.py index dcff07e..6a6d75d 100644 --- a/lab-01/r-1.4_scratch.py +++ b/lab-01/r-1.4_scratch.py @@ -4,5 +4,17 @@ Created on Fri Sep 4 21:18:16 2026 @author: joseph + +Write a short Python function that takes a positive integer n and returns the +sum of the squares of all the positive integers smaller than n. """ +def squares_sum(n): + list = [] + while n >= 1: + n = n - 1 + print(n) + + + +squares_sum(12) \ No newline at end of file