Added code for lecture 2026-11-10
This commit is contained in:
parent
5b630435ae
commit
07b9e54bf0
52 changed files with 1248 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
# https://www.programiz.com/python-programming/for-loop
|
||||
scores = [70, 91, 85, 90, 100]
|
||||
scores = [70, 91, 85, 90, 100,67.3]
|
||||
#scores = [100,100,100,100, 100]
|
||||
|
||||
print(f"The length of this list of scores is {len(scores)}")
|
||||
|
||||
|
|
@ -10,3 +11,4 @@ for i in scores:
|
|||
scoreSum += i
|
||||
else:
|
||||
print("The average is ",scoreSum/len(scores))
|
||||
print(f"The average is {scoreSum/len(scores):.1f}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue