Added lecture 2026113
This commit is contained in:
parent
be356ccb59
commit
5b630435ae
27 changed files with 738 additions and 0 deletions
12
lecture20261103/for01/for06.py
Normal file
12
lecture20261103/for01/for06.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# https://www.programiz.com/python-programming/for-loop
|
||||
scores = [70, 91, 85, 90, 100]
|
||||
|
||||
print(f"The length of this list of scores is {len(scores)}")
|
||||
|
||||
scoreSum = 0
|
||||
for i in scores:
|
||||
print(i)
|
||||
scoreSum += i
|
||||
else:
|
||||
print("The average is ",scoreSum/len(scores))
|
||||
Loading…
Add table
Add a link
Reference in a new issue