#this function will get the total scores def getScores(totalScores, number): for counter in range(0, number): score = input('Enter their score: ') totalScores = totalScores + score while score > 100 or score < 0: print "Your scores must be between 0 and 100." score = input('Enter their score: ') return totalScores

This is the output once I type in 2 invalid numbers followed by valid ones.

How many students took the test: 2 Enter their score: 555 Enter their score: 444 Your scores must be between 0 and 100. Enter their score: 34 The average test score is 499 Do you want to end program? (Enter no to process a new set of scores):

As you can see, it wont even let me type in 2 more scores after the first two invalid ones. Plus, it averages the three numbers.. Please help