What is the output of the following Python program?

User Generated

nnebaw9999

Computer Science

Description

Q1.pdf

The answer is given, but I don't know why. If someone can give me an explanation on this, that would be greatly appreciated.





Unformatted Attachment Preview

CS177 Spring 2015 Midterm 2 - Page 2 of 19 1. What is the output of the following Python program? def myFunc ( matrix ) : x = matrix [ 0 ] [ 0 ] for i in range ( len ( matrix ) ) : for j in range ( len ( matrix [ 0 ] ) ) : i f i == j and x < matrix [ i ] [ j ] : x = matrix [ i ] [ j ] print ( x ) matrix = [ [ 5 , 0 , [7 , 0 , [3 , 4 , [1 , 2 , myFunc ( matrix ) A. 0 B. 1 C. 11 D. 17 E. 20 10 , 2 0 ] , 17 , 3 ] , 9 , 15] , 6, 11]] April 02, 8pm-9pm
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Content

Related Tags