Question: Exercise 1 [Rectangular Matrices] Write a function is Rectangle() that takes a list of lists as a parameter and returns a Boolean (either True or

 Exercise 1 [Rectangular Matrices] Write a function is Rectangle() that takes

Exercise 1 [Rectangular Matrices] Write a function is Rectangle() that takes a list of lists as a parameter and returns a Boolean (either True or False) if the list of lists is rectangular (i.e., every "row" has the same length). For example, >>> isRectangle([["0","1"],["2", "3"]]). True >>> isRectangle([["0","1"],["2","3","4"]]) False The function should not care what the data looks like. The examples above are strings but they could be anything. Exercise 2 (Checking for Integers] Write a function is NumericalHelper() that takes a list of strings as a parameter and returns a Boolean (either True or False) to indicate whether or not every element in the list is an integer or not. You can check if a given string is a non-negative integer using the isdigit() string function. How can you use this to detect negative integers too? For example, >>> isNumericalHelper (["0","1","-13"]) True >>> isNumericalHelper (["0","1.32","22","x"]) False Do NOT use try/except for this

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!