VOOZH about

URL: https://www.geeksforgeeks.org/python/dice-rolling-simulator-using-python-random/

⇱ Dice Rolling Simulator using Python-random - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Dice Rolling Simulator using Python-random

Last Updated : 15 Jul, 2025

In this article, we will create a classic rolling dice simulator with the help of basic Python knowledge. Here we will be using the random module since we randomize the dice simulator for random outputs.

Function used:

1) random.randint(): This function generates a random number in the given range. Below is the implementation.

Example 1: Dice Simulator

Output: 

👁 Image

Example 2: Dice simulator

Output:

👁 Image
 
👁 Image
 
Comment
Article Tags:
Article Tags: