Question: IN PYTHON Problem Statement: Given an n - by - n matrix ( aka grid ) with each cell containing a positive integer, return True

IN PYTHON
Problem Statement: Given an n-by-n matrix (aka grid) with each cell containing a positive integer, return True if and only if the following are all true:1. Each row contains only unique values. 2. Each column contains only unique values. 3. Each quadrant contains only unique values. There are four quadrants in the matrix: top left, top right, bottom left, bottom right. Otherwise, return False.Your program should accept just one parameter: 1. The matrix.Constraints: The matrix is a list of lists. Each list within the list contains integers. 2= n =2048 n is a power of 2: 2,4,8,16,,20481= each cell value (i.e. integer within the list of lists)=4194304 No library can be imported for this assignment. Your program needs to complete each test case within 5 seconds, otherwise, it is considered a failure. The function name of your code must be isValidGrid and must take in a single parameter, the input matrix. Your program should only return a Boolean: True or False. Your program must be able to be run from the Python command line as mentioned in the Examples section below.Submission Requirements:Failure to follow any of the requirements in this document (items listed below or above) will result in point deductions, up to and including receiving zero credit. 1. Write your name as a comment at the top of your code. 2. The filename of the code that you submit should be: cecs328pa1.py3. Your program must be able to be executed via the Python command line (see the Examplessection below).
Problem Statement:
Given an n-by-n matrix (aka grid) with each cell containing a positive integer, return True if and only if
the following are all true:
Each row contains only unique values.
Each column contains only unique values.
Each quadrant contains only unique values. There are four quadrants in the matrix: top left, top
right, bottom left, bottom right.
Otherwise, return False.
Your program should accept just one parameter:
The matrix.
Constraints:
The matrix is a list of lists. Each list within the list contains integers.
2n2048
n is a power of 2:2,4,8,16,dots,2048
1 each cell value (i.e. integer within the list of lists)4194304
No library can be imported for this assignment.
Your program needs to complete each test case within 5 seconds, otherwise, it is considered a
failure.
The function name of your code must be isValidGrid and must take in a single parameter, the
input matrix.
Your program should only return a Boolean: True or False.
Your program must be able to be run from the Python command line as mentioned in the
Examples section below.
IN PYTHON Problem Statement: Given an n - by - n

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 Programming Questions!