Hello everyone,
I am trying to create a dice roll game where 2 players can roll 2 dice each for 5 rounds and then their points are added up. I am trying to use a for loop, but can't seem to find a way to add up the numbers from those 5 rounds. This is what I have so far:
I am trying to create a dice roll game where 2 players can roll 2 dice each for 5 rounds and then their points are added up. I am trying to use a for loop, but can't seem to find a way to add up the numbers from those 5 rounds. This is what I have so far:
for i in range(5): die1 = random.randint(1,6) die2 = random.randint(1,6) diesum = die1 + die2 print("Your score for this round is",diesum)How can I calculate the sum of all five 'diesum's ?