Python includes exercises 38

Python includes exercises 38

Title: seeking a 3 * 3 matrix and the elements of the main diagonal.

Analysis procedure: using a double loop for appliance repair control input of a two-dimensional array, and then a [i] [i] after the accumulated output.

Source Code:

 

 Examples of the above output is:

 

Guess you like

Origin www.cnblogs.com/danjiu/p/12435862.html
Recommended