Commit Graph

3 Commits

Author SHA1 Message Date
Pat Wick e8b85fd9a2 Fixed the start point and stride on prints
If we wanted to print up to and including the maximum value, should it fall appropriately
into the range (maximum = 100, for example, we might want to print 0,2,4,...,96,98,100)
we could make the max value in the range() function "maximum + 1" to make the endpoint
sort of pseudo-inclusive of that new target value.

It's not so much an uncertainty about ranges, but I always seem to run into an indexing problem
when utilizing ranges in a loop to iterate through a string or list or some array. I know I'm
probably going to have the problem, I try to plan around it, I still end up with the problem, so I
at least know where the issue lies when I have the inevitable error message.
2023-07-28 10:52:58 -04:00
Pat Wick 2a1f9b15af resubmitting square.py
I wasn't difficult to implement a for-loop for square.py because I do have some experience with programming
and replacing the same instructions with no conditionals or decision-making required was easy enough. I took the
repetitive pieces, counted them (squares have 4 sides) and used that as the basis for the instructions inside the loop,
then set the for-loop to iterate those four repetitions.
2023-07-24 08:55:04 -04:00
pwick 6f1d2d6c40 Initial commit 2023-07-24 12:54:10 +00:00