The question:
Before I go to the actual question I am going to make an comparison with roullete
For example:
For the sake of the example we will forget the chance of the ball hitting ‘zero’
|
Bet |
Winnings |
|
|
Red |
1 |
1 |
|
Black |
1 |
1 |
This means that your total loss will always equal your total win and you could never lose or win
Another example:
|
Payout |
Bet |
Winnings |
loss |
|
2x |
15 |
30 |
|
|
3x |
10 |
30 |
|
|
6x |
5 |
30 |
|
|
Total bet |
30 |
||
|
Total winning |
30 |
||
But what if the odds where defined as in the tabel, how much dollar on each section would you need to place to always play the optimum.
With the optimum being the closest to 0 or above
|
Payout |
Bet |
Winnings |
loss |
|
2x |
|||
|
3x |
|||
|
6x |
|||
|
11x |
|||
|
21x |
|||
|
41x |
To always play optimum, our winnings should be same in ALL CASES.
Therefore, Winnings will be the LCM of 2,3,6,11,21,41 i.e. 18942
|
Payout |
Bet (18942/Payout) |
Winnings |
loss |
|
2x |
9471 |
18942 |
|
|
3x |
6314 |
18942 |
|
|
6x |
3157 |
18942 |
|
|
11x |
1722 |
18942 |
|
|
21x |
902 |
18942 |
|
|
41x |
462 |
18942 |
The question: Before I go to the actual question I am going to make an comparison...
please use python and provide run result, thank you!
click on pic to make it bigger
For this assignment you will have to investigate the use of the Python random library's random generator function, random.randrange(stop), randrange produces a random integer in the range of 0 to stop-1. You will need to import random at the top of your program. You can find this in the text or using the online resources given in the lectures A Slot Machine Simulation Understand...