lundi 12 août 2019

How to add together the total of 2 random numbers between 1 and 6 5 times

I'm making a code in python where two dice are rolled 5 times and the total of those 5 separate rolls are added together- however after generating the numbers i don't know how to add them together.

def roll(value): for i in range(5): import random roll1 = float(random.randint(1,7)) roll2 = float(random.randint(1,7))

Thanks for any help.




Aucun commentaire:

Enregistrer un commentaire