Code for rolling Dice
The kids wanted to play a game today, but when they opened the box there was a dice missing, so they thought they couldn't play.
Why use common sense and use a dice from another game, I remembered this piece of code I picked up from an O'Reilly training video I watched before and had writen down.
So I copied the code to Pythonista on my iPad and the game could continue, thanks to these few lines, the kids were like "Dad, your such a nerd", Such compliments.
The code can be found on my gitlab , only 9 lines of code. You can change it if your dice you are wanting to replace has more than six sides.
I am always interested in your thoughts so if you have any comments or feedback then please feel free to add any comments, or you can mail me here.