Array testgrades contains num_vals test scores. write a for loop that sets sumextra to the total extra credit received. full credit is 100, so anything over 100 is extra credit. ex: if testgrades = {101, 83, 107, 90}, then sumextra = 8, because 1 0 7 0 is 8.

Respuesta :

# Written in python

# These are our variables
sumExtra = 0
testGrades = [101,83,107,90]

# Iterating through the testGrades list
for number in testGrades:
    if number > 100:
        sumExtra = sumExtra + 1


# Printing results
print("Your total extra credit is" , sumExtra)
    
    

ACCESS MORE