##Write code to simulate a dice game which follows these rules: ## ##- Start with 0 points - variables: points = 0 ##- Roll two 6-sided dice ##- Add up the values of the two dice ##- If the values add up to 7 and one of the dice is a 5, get 3 points ##- If the values add up to 7 get 1 point ##- If the values add up to 2 get -1 point from random import * def dice_game(times): points = 0 for i in range(times): d1 = randint(1, 6) d2 = randint(1, 6) if(d1 + d2 == 7 and (d1 == 5 or d2 == 5)): points = points + 3 elif(d1 + d2 == 7): points = points + 1 elif(d1 + d2 == 2): points = points - 1 print("You rolled " + str(d1) + ", " + str(d2) + " and you now have " + str(points) + " points!") dice_game(10)