Re: Python Probability

2018-09-11 Thread Gary Herron
On 09/11/2018 11:54 AM, end...@freemail.hu wrote: Hello, I am new to Python and I have an exercise which I struggle with. The question is: In the strategic board game called Risk, one player can attack up to three soldiers simultaneously, while the defending player can defend up to two. In th

Re: Python Probability

2018-09-11 Thread Gary Herron
On 09/11/2018 11:54 AM, end...@freemail.hu wrote: Hello, I am new to Python and I have an exercise which I struggle with. The question is: In the strategic board game called Risk, one player can attack up to three soldiers simultaneously, while the defending player can defend up to two. In th

Re: Python Probability

2018-09-11 Thread Peter Pearson
On Tue, 11 Sep 2018 20:54:23 +0200 (CEST), Bat erdene endzis wrote: [snip] > def dice(): > attacker_dice=[random.randint(1,6) for _ in range(3)] > defender_dice=[random.randint(1,6) for _ in range(2)] > a=max(attacker_dice) > b=max(defender_dice) > for i in range(1000): >

Python Probability

2018-09-11 Thread Bat erdene endzis
Hello, I am new to Python and I have an exercise which I struggle with. The question is: In the strategic board game called Risk, one player can attack up to three soldiers simultaneously, while the defending player can defend up to two. In the case of exactly three attackers and two defenders,