Log in om je oplossingen te testen.
# Polyhedral dice program # ------------------------- # Import libraries # ------------------------- import random # ------------------------- # Subprograms # ------------------------- def roll_dice(): return random.randint(1, 6) # ------------------------- # Main program # ------------------------- random.seed() number = roll_dice() print("You rolled a", number)

  Python sandbox

In dit venster kan je Python-code uitvoeren zonder iets te moeten installeren. De code die je hier schrijft wordt niet automatisch ingediend in Dodona.

Testgeval dat gedebugd wordt