Question: Must be in Python(please have a screen shot on these solution code) ** 1 1.1 1 (Game: nine heads and tails) Nine coins are placed

Must be in Python(please have a screen shot on these solution code)Must be in Python(please have a screen shot on these solution code)

** 1 1.1 1 (Game: nine heads and tails) Nine coins are placed in a 3 3 matrix with some face up and some face down. You can represent the state of the coins with the val- ues 0 (heads) and 1 (tails). Here are some examples 0 0 0 101 110 0100 01 100 11 0 1 11 000 10 0 001 10 0 10 1 1 0 0 1 1 0 Each state can also be represented using a binary number. For example, the pre- ceding matrices correspond to the numbers There are a total of 512 possibilities. So, you can use the decimal numbers 0, 1, 2, 3, ., and 511 to represent all states of the matrix. Write a program that prompts the user to enter a number between 0 and 511 and displays the corresponding 3 3 matrix with the characters H and T. Here is a sample run Enter a number between0 and 511:7 Enter The user entered 7, which corresponds to 000000111. Since 0 stands for H and 1 for T, the output is correct *11.13 (Locate the largest element) Write the following function that returns the location of the largest element in a two-dimensional list: def locateLargest(a): The return value is a one-dimensional list that contains two elements. These two elements indicate the row and column indexes of the largest element in the two-dimensional list. Write a test program that prompts the user to enter a two- dimensional list and displays the location of the largest element in the list. Here is a sample run: Enter the number of rows in the list: 3 Enter Enter a row: 23.5 35 2 10 Enter Enter a row: 4.5 3 45 3.5 -Enter Enter a row: 35 44 5.5 11.6 I-Enter The location of the largest element is at (1, 2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!