Question: write a program which does the following: . Prompt the first player to enter the hand where they want to hide the coin. The

write a program which does the following:  Prompt the first player to enter the hand where they want to hide

write a program which does the following: . Prompt the first player to enter the hand where they want to hide the coin. The player must imput "I" for left, or "r" for right in the console. Prompt the second player to guess the hand where the coin is hidden. Just like the previous player, player 2 must imput "I" for left, or "r" for right in the console. The console will ask for inputs until the players enters the correct one ("I" or "r"). Print the player who wins the round. Print the player who wins 3 rounds first. Hint: You will need nested loops for this code. Sample Run Sample input and output (input typed by the user is shown in green text): Round 1: Playerl, Hide coin in left or right hand? (1/r): 1 Player2, Guess! Left or right hand? (1/r): r Player2, You guessed it wrong! Round 2: Playerl, Hide coin in left or right hand? (1/r): r Player 2, Guess! Left or right hand? (1/2): w Player2, Please make a valid guess! Left or right hand? (1/r): r Player 2, You guessed it correctly! Round 3: Playerl, Hide coin in left or right hand? (1/r): 1 Player2, Guess! Left or right hand? (1/r): 1 Player2, You guessed it correctly! Round 4: Playerl, Hide coin in left or right hand? (1/r): r Player2, Guess ! Left or right hand? (1/r): I Player2, You guessed it correctly! Player 2 wins!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Python def hidecoin Prompts the first player to enter the hand where they want to hide the coin player1input inputPlayer1 Hide coin in left or right hand 11 while player1input not in 1 r player1input ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!