Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please display the running of your python code. You will need to create two text files Write a python function describe(matrix) that takes as input

please display the running of your python code. You will need to create two text files

Write a python function describe(matrix) that takes as input a 2D array and RETURNS 'Square' if the matrix is square, 'Rectangular' if the matrix is rectangular, and 'Invalid' if neither. Square matrices have the same number of rows and columns. This is a 5x5 square matrix: 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9 Rectangular matrices can have different numbers of rows and columns, but each row is the same length. This is a 2x5 rectangular matrix: 1 2 3 4 5 0 2 4 6 8 Invalid matrices have an inconsistent length in their rows. This is an invalid matrix: 1 2 3 4 5 5 4 3 2 1 0 8 6 2 9 1 0 8 4 2 4 7 NOTE: All square matrices are also rectangular -- only RETURN 'Square' if it is square.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions