import random outcome1 = 0 outcome2 = 0 total_outcome = 0 roll1 = input('Do you wish to roll (y/n)') if roll1 == 'y': print('Roll 1 ...') outcome1 = random.randint( 1, 6 ) print( 'You rolled a ', outcome1) total_outcome = outcome1 roll2 = input('Do you wish to roll again (y/n)') if roll2 == 'y': print('Roll 2 ...') outcome2 = random.randint( 1, 6) print('You rolled a ', outcome2) if outcome1 == outcome2: print('Snake eyes') else: total_outcome = outcome1 + outcome2 if roll1 or roll2 == 'n': print('Your total score is', total_outcome) print('Goodbye!')