diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-03 08:12:51 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-03 08:12:51 +0000 |
commit | ac251555ed20bf2414c576539bf81e7f898c98f9 (patch) | |
tree | ccd4e0f3f2ab8ff95513233e2ca391f78d8920d3 /wk6/lect/scores.py | |
parent | f2488a2090ecdaf022d8a53babb4ec15268ad98f (diff) |
Fri, May 3, 2024, 1:12 AM -07:00
Diffstat (limited to 'wk6/lect/scores.py')
-rw-r--r-- | wk6/lect/scores.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/wk6/lect/scores.py b/wk6/lect/scores.py index f046193..15f310d 100644 --- a/wk6/lect/scores.py +++ b/wk6/lect/scores.py @@ -1,4 +1,15 @@ # scores = [72, 73, 33] - +# # avg = sum(scores) / len(scores) # print("Average: ", avg) + + +from cs50 import get_int + +scores = [] +for i in range(3): + score = get_int("Score: ") + scores.append(score) + +avg = sum(scores) / len(scores) +print("Average: ", avg) |