Skip to content

Instantly share code, notes, and snippets.

@shinysu
Created September 13, 2021 12:38
Show Gist options
  • Save shinysu/1eaa6b527d5f8ceff63a72dc01277e28 to your computer and use it in GitHub Desktop.
Save shinysu/1eaa6b527d5f8ceff63a72dc01277e28 to your computer and use it in GitHub Desktop.
rolling dice
import random
values = [1, 2, 3, 4, 5, 6]
result = random.choice(values)
print("Result of dice rolling is :", result)
import random
values = [1, 2, 3, 4, 5, 6]
repeat = 'yes'
while repeat == 'yes' or repeat == 'y':
result = random.choice(values)
print("Result of dice rolling is :", result)
repeat = input("Do you want to repeat?")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment