Question: Hi I'm currently struggling/stuck on making a code for this problem. Can you also critique my existing code so I can see where I went

Hi I'm currently struggling/stuck on making a code for this problem. Can you also critique my existing code so I can see where I went wrong if thats possible. ( Code must be in python ). Thank You

Write a better dice game with money betting and checks on bet. Also, user can play multiple times until he quits or runs out of money Write a game of dice and determine win, lose or tie for each game. In this game, the user has 2 dices and the computer has 2 dices The rule for the games is as follows: 1. A pair of "same face will be a pair of different faces. For example, a pair of 1&1 will beat a pair of 685. 2. If both user and computer have pair of same face, higher total points will beat lower total points. For example, a pair of 686 will beat a pair of 5&5. If computer has 4&4 and user has 484, then this is a tie. 3. If neither player or computer has pairs, total points will be used to determine winning. For example, 5&3 is 8 and it beats 4&2. Please check for tie as well. import random same_face = [(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)] different_face = not[same_face] # Returns a value of 2 dice def roll_dice : a = random.randint(1,6) b- random.randint(1,6) return a and b def play_one_round(bet): roll - roll_dice() if roll == same_face: print("You Win") return bet elif roll == different_face: print("Your broke, Leave!") return -bet else: point = roll print Ln: 7 Col: 27 Write a better dice game with money betting and checks on bet. Also, user can play multiple times until he quits or runs out of money Write a game of dice and determine win, lose or tie for each game. In this game, the user has 2 dices and the computer has 2 dices The rule for the games is as follows: 1. A pair of "same face will be a pair of different faces. For example, a pair of 1&1 will beat a pair of 685. 2. If both user and computer have pair of same face, higher total points will beat lower total points. For example, a pair of 686 will beat a pair of 5&5. If computer has 4&4 and user has 484, then this is a tie. 3. If neither player or computer has pairs, total points will be used to determine winning. For example, 5&3 is 8 and it beats 4&2. Please check for tie as well. import random same_face = [(1,1), (2,2), (3,3), (4,4), (5,5), (6,6)] different_face = not[same_face] # Returns a value of 2 dice def roll_dice : a = random.randint(1,6) b- random.randint(1,6) return a and b def play_one_round(bet): roll - roll_dice() if roll == same_face: print("You Win") return bet elif roll == different_face: print("Your broke, Leave!") return -bet else: point = roll print Ln: 7 Col: 27
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
