Python exercise

Polyhedral dice

Sign in to hand in your solution and get feedback.

# 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)