''' DS2000 Spring 2023 Sample code from class - making a dice game with two six sided dice If both dice are 5, then Laney gets $50 If both dice are the same (but not fives), then Laney loses $40 If both dice are odd, then Laney gets $50 If both are even, then Laney loses $10 ''' import random def main(): # Gather data - roll two six-sided dice die1 = random.randint(1, 6) die2 = random.randint(1, 6) money = 0 # Sanity check, print out information so far print("Die 1:", die1) print("Die 2:", die2) # Computations - implement the rules of the game as desribed above # First conditional structure - check the first rule for 5/5 or same values if die1 == 5 and die2 == 5: money = money + 50 elif die1 == die2: money = money - 40 # Second conditional structure - independent of the first if (die1 % 2 == 1) and (die2 % 2 == 1): money = money + 50 elif (die1 % 2 == 0) and (die2 % 2 == 0): money = money - 10 # Communication - how much money did i end up with? print("After rolling two dice, Laney has $", money, sep = "") main()