Skip to content

Instantly share code, notes, and snippets.

@suzukiyoshihisa
Created August 31, 2020 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzukiyoshihisa/55efaf2f3b16ddd908f194a3a6d628a6 to your computer and use it in GitHub Desktop.
Save suzukiyoshihisa/55efaf2f3b16ddd908f194a3a6d628a6 to your computer and use it in GitHub Desktop.
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