We say that an n-by-n matrix A with integer entries is okay if there is exactly one 1 on every row and column.
  1. Draw the flowchart of an algorithm to print True if a given n-by-n matrix A with integer entries is okay, and False otherwise.
  2. Give Python code to define a function IsOkay. This function takes on input a numpy matrix as single argument. Either True or False is returned, depending whether the matrix on input is okay or not.

    Answer: quiz2b.py