Created
September 13, 2021 12:38
-
-
Save shinysu/1eaa6b527d5f8ceff63a72dc01277e28 to your computer and use it in GitHub Desktop.
rolling dice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
values = [1, 2, 3, 4, 5, 6] | |
result = random.choice(values) | |
print("Result of dice rolling is :", result) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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