Question: 1.Use the Design Recipe to write a function called countEvensNxN that consumes a nested list representing a matrix of size N x N. The function

1.Use the Design Recipe to write a function called countEvensNxN that consumes a nested list representing a matrix of size N x N. The function returns the number of even numbers in the matrix. Note: You may assume the list argument passed to the function is a nested list.

2.Use the Design Recipe to write the function diagonal_diff which consumes an N x N matrix of numbers (nested list). and calculates the absolute difference between the sums of its diagonals.

3.Use the Design Recipe to write a function, mask_encode, that takes a list of booleans and a string and returns the characters from the string whose position is True in the list of booleans. It is possible that the list of booleans is longer than the string.

4. Use the Design Recipe to write a function, total_strange_caps, that take a list of words (strings) and returns the total number of capital letters that appear in positions other than the beginning of a word. You must break this problem into a sub-problem by first writing a function count_strange_caps that takes a single word and returns the number of capital letters that appear in positions other than the beginning of the word. You must then use this function in your total_strange_caps function. You need to use either the isupper() or islower() method of a string. Note: if the hidden test case is failing you need to make sure you are only using 2 loop statements total.

All the problems are in Python Please do NOT use# to explain, I only need the final correct answer. Thank you!

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!