Average calculation Program *need help*
Jake Kobs
kobsx4 at gmail.com
Fri May 13 01:46:51 EDT 2016
Thank you for the help..I think I'm getting closer, but I feel like after they enter an invalid number, it should reset the invalid number(s) somehow. Here's my updated code:
------------------------------------------------------------------------------
#this function will get the total scores
def getScores(totalScores, number):
for counter in range(0, number):
score = input('Enter their score: ')
if (score < 100 and score > 0):
totalScores = totalScores + score
while (score > 100 or score < 0):
print "Your scores must be between 0 and 100."
score = input('Enter their score: ')
score = input('Enter their score: ')
totalScores = totalScores + score
return totalScores
----------------------------------------------------------------------------
More information about the Python-list
mailing list