Oct-20-2019, 06:10 PM
Hello,
Let me start by saying that i have no idea what im doing :). Turned 30, got a kid decided to lern coding for some reason (relly enjoy it so far).
Trying to make a program that roll 3 dices and list the probability in %.
so far i got the following:
Profeteus
Let me start by saying that i have no idea what im doing :). Turned 30, got a kid decided to lern coding for some reason (relly enjoy it so far).
Trying to make a program that roll 3 dices and list the probability in %.
so far i got the following:
dice_1 = [1, 2, 3, 4, 5, 6] dice_2 = [1, 2, 3, 4, 5, 6] dice_3 = [1, 2, 3, 4, 5, 6] def roll_dice(): avrage = 0 for x in dice_1: avrage = x for y in dice_2: avrage = x+y for z in dice_3: avrage = x+y+z "When i run the def i get a list of every possible toss that can be made with 3 t6 dices. How can i now go forward? what im looking for is:
Output:chance to roll:
3 -> 4%
4 -> 5%
5 -> 7%
(and so on).
BRProfeteus