Challenge: Dice Roller
Discover how to simulate rolling two six-sided dice by creating a Python function that uses the random module. This lesson helps you practice generating random numbers, defining and calling functions, and handling multiple variables to create an interactive program.
We'll cover the following...
We'll cover the following...
In this challenge, you’ll create a function that simulates rolling two six-sided dice. You’ll use Python’s random.randint() function to generate numbers between 1 and 6, just like a real die.
This will help you practice:
Using the
randommodule.Creating and calling functions.
Working with multiple variables.