Skip to content

Instantly share code, notes, and snippets.

@suzukiyoshihisa
Created August 31, 2020 18:03
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/566a8ed5a46a25e4142fe44e9f393c4f to your computer and use it in GitHub Desktop.
Save suzukiyoshihisa/566a8ed5a46a25e4142fe44e9f393c4f to your computer and use it in GitHub Desktop.
import random
def main():
dice_rolls = 2
dice_sum = 0
for i in range(0, dice_rolls):
roll = random.randint(1, 6)
dice_sum = dice_sum + roll
print(f'You rolled a {roll}')
print(f'You have rolled a total of {dice_sum}')
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment