Solve 6.3.2

This commit is contained in:
Joe S 2021-02-14 15:48:11 -05:00
parent d97e42d717
commit 50b32271e2
1 changed files with 9 additions and 0 deletions

9
6/6.3/6.3.2/main.py Normal file
View File

@ -0,0 +1,9 @@
user_input = input()
test_grades = list(map(int, user_input.split())) # test_grades is an integer list of test scores
sum_extra = -999 # Initialize 0 before your loop
sum_extra = sum([i for i in test_grades if i > 100]) - (len([i for i in test_grades if i > 100]) * 100)
print('Sum extra:', sum_extra)