[Solved] How to add up all the scores from each round to get a total score


At the end of your function,

return total_value_in_a_round

At the end of OneRound, return the score to the calling program by combining the last two lines:

return userscore()

In your main program, set up a loop to play 5 times, and keep a running sum of the score:

total_score = 0
for round in range(5):
    total_score += OneRound()

print "Your score for 5 rounds is", total_score

solved How to add up all the scores from each round to get a total score