Answers for "how to make dice rolling simulator in python"

1

dice rolling simulator python

from random import randint

def roll_dice():
    print(f"Number is: {randint(1,6)}")

# Do this to simulate once
roll_dice()   

# Do this to simulate multiple times
whatever = 12 # Put the number of times you want to simulate here
for number in range(whatever):
    roll_dice()
Posted by: Guest on July-11-2020

Code answers related to "how to make dice rolling simulator in python"

Python Answers by Framework

Browse Popular Code Answers by Language