Added lecture 2026113

This commit is contained in:
Edward Bigos 2026-11-03 12:49:45 -05:00
commit 5b630435ae
27 changed files with 738 additions and 0 deletions

View file

@ -0,0 +1,15 @@
# Program to print squares of all numbers present in a list
# https://beginnersbook.com/2018/01/python-for-loop/
# List of integer numbers
numbers = [1, 2, 4, 6, 11, 20]
# variable to store the square of each num temporary
sq = 0
# iterating over the given list
for val in numbers:
# calculating square of each number
sq = val * val
# displaying the squares
print(sq)