Share your repls and programming experiences

← Back to all posts
Dice roll virtually
Carnage498 (58)

Just a dice roll game virtually

Comments
hotnewtop
DynamicSquid (5029)

Just a tip, you can use loops to shorten your code:

import random, time

print("Random Dice Mover!")

again = "yes"
while again == "yes":
  for i in range(10): # repeat 10 times
    time.sleep(3)
    side = random.randrange(1, 7)
    print(f"move {side} number of times")
    print("next")

  again = input("want to do it again?")