From 3dcb626fa76bce05a69b71a2ca940884008955a7 Mon Sep 17 00:00:00 2001 From: baphim <269010393+baphim@users.noreply.github.com> Date: Fri, 4 Sep 2026 22:38:57 -0400 Subject: [PATCH] feat(r-1.4_scratch.py): isolated list of squares of positive integers smaller than n --- 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 6a35776..fa379d0 100644 --- a/lab-01/r-1.4_scratch.py +++ b/lab-01/r-1.4_scratch.py @@ -15,10 +15,9 @@ def squares_sum(n): n = n - 1 list.append(n) if n == 1: - square_list = [] - for val in list: - square_list.append(val*val) - print(square_list) + square_list = [m*m for m in list] + print(square_list) +