Created
August 31, 2020 18:04
-
-
Save suzukiyoshihisa/55efaf2f3b16ddd908f194a3a6d628a6 to your computer and use it in GitHub Desktop.
This file contains 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
def main(): | |
dice_rolls = 2 | |
dice_sum = 0 | |
for i in range(0, dice_rolls): | |
roll = random.randint(1, 6) | |
dice_sum += roll | |
if roll == 1: | |
print(f'You rolled a {roll}! Critical Fail') | |
elif roll == 6: | |
print(f'You rolled a {roll}! Critical Success!') | |
else: | |
print(f'You rolled a {roll}') | |
print(f'You have rolled a total of {dice_sum}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment