![Dice image](dice/dice1.jpg)
Step 1 – throw a die
Lets start by throwing a single six sided die.
That's a normal "dice" to you.
This is pretty easy in Python.
It uses a library of routines that people have already written called random. So we need to start by importing that library – which is there the import random line comes in
- Start by opening Python
- Then go File > New File to open your blank Python canvas to code in
- Use the code in the screenshot
- Save your program
- Run the program to check that it works
- Make sure you run your program a few times. You should get a random pattern of die throws – all of which should be between 1 and 6!
It's a pretty simple program to start with.
The die rolls should be random.
Note: a single dice is called a "die"; "dice" is the plural. So it's "one die" and "two dice".