import random
# Create a 4x4 two-dimensional list filled with random numbers
rows, cols = 4, 4
matrix = [[random.randint(0, 100) for _ in range(cols)] for _ in range(rows)]
# Print the matrix
print("Matrix:")
for row in matrix:
print(row)
# Initialize variables to track the maximum value and its indexes
max_value = float('-inf')
max_index = (-1, -1)
# Iterate through the matrix to find the maximum value and its indexes
for i in range(rows):
for j in range(cols):
if matrix[i][j] > max_value:
max_value = matrix[i][j]
max_index = (i, j)
# Print the maximum value and its indexes
print(f"\nMaximum value: {max_value}")
print(f"Indexes of maximum value: {max_index}")
aW1wb3J0IHJhbmRvbQoKIyBDcmVhdGUgYSA0eDQgdHdvLWRpbWVuc2lvbmFsIGxpc3QgZmlsbGVkIHdpdGggcmFuZG9tIG51bWJlcnMKcm93cywgY29scyA9IDQsIDQKbWF0cml4ID0gW1tyYW5kb20ucmFuZGludCgwLCAxMDApIGZvciBfIGluIHJhbmdlKGNvbHMpXSBmb3IgXyBpbiByYW5nZShyb3dzKV0KCiMgUHJpbnQgdGhlIG1hdHJpeApwcmludCgiTWF0cml4OiIpCmZvciByb3cgaW4gbWF0cml4OgogICAgcHJpbnQocm93KQoKIyBJbml0aWFsaXplIHZhcmlhYmxlcyB0byB0cmFjayB0aGUgbWF4aW11bSB2YWx1ZSBhbmQgaXRzIGluZGV4ZXMKbWF4X3ZhbHVlID0gZmxvYXQoJy1pbmYnKQptYXhfaW5kZXggPSAoLTEsIC0xKQoKIyBJdGVyYXRlIHRocm91Z2ggdGhlIG1hdHJpeCB0byBmaW5kIHRoZSBtYXhpbXVtIHZhbHVlIGFuZCBpdHMgaW5kZXhlcwpmb3IgaSBpbiByYW5nZShyb3dzKToKICAgIGZvciBqIGluIHJhbmdlKGNvbHMpOgogICAgICAgIGlmIG1hdHJpeFtpXVtqXSA+IG1heF92YWx1ZToKICAgICAgICAgICAgbWF4X3ZhbHVlID0gbWF0cml4W2ldW2pdCiAgICAgICAgICAgIG1heF9pbmRleCA9IChpLCBqKQoKIyBQcmludCB0aGUgbWF4aW11bSB2YWx1ZSBhbmQgaXRzIGluZGV4ZXMKcHJpbnQoZiJcbk1heGltdW0gdmFsdWU6IHttYXhfdmFsdWV9IikKcHJpbnQoZiJJbmRleGVzIG9mIG1heGltdW0gdmFsdWU6IHttYXhfaW5kZXh9Iik=
Matrix:
[97, 37, 36, 26]
[12, 63, 15, 23]
[19, 1, 61, 31]
[37, 65, 19, 33]
Maximum value: 97
Indexes of maximum value: (0, 0)