14 lines
362 B
Python
14 lines
362 B
Python
|
|
# https://www.programiz.com/python-programming/for-loop
|
|
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)}")
|
|
|
|
scoreSum = 0
|
|
for i in scores:
|
|
print(i)
|
|
scoreSum += i
|
|
else:
|
|
print("The average is ",scoreSum/len(scores))
|
|
print(f"The average is {scoreSum/len(scores):.1f}")
|