#MyCode n = int(input("Input the size of the matrix: ")) list1 = [] #To store the sum of each row list2 = [] #To store the indexes of odd rows list3 = [] #To store the remainders ...to compare and find the largest one matrix = [[0] * n for row in range(0, n)] for x in range(0, n): line = list(map(int, input().split())) #To take input in a sequence for y in range(0, n): matrix[x][y] = line[y]
#MyCode n = int(input("Input the size of the matrix: ")) list1 = [] #To store the sum of each row list2 = [] #To store the indexes of odd rows list3 = [] #To store the remainders ...to compare and find the largest one matrix = [[0] * n for row in range(0, n)] for x in range(0, n): line = list(map(int, input().split())) #To take input in a sequence for y in range(0, n): matrix[x][y] = line[y]
#MyCode n = int(input("Input the size of the matrix: ")) list1 = [] #To store the sum of each row list2 = [] #To store the indexes of odd rows list3 = [] #To store the remainders ...to compare and find the largest one matrix = [[0] * n for row in range(0, n)] for x in range(0, n): line = list(map(int, input().split())) #To take input in a sequence for y in range(0, n): matrix[x][y] = line[y]
I will be pasting here my code for easy reference.
The given problem is in the photo I will attach
will give thumbs up if I perfect the testcases thank you!
#MyCode
n = int(input("Input the size of the matrix: "))
list1 = [] #To store the sum of each row list2 = [] #To store the indexes of odd rows list3 = [] #To store the remainders ...to compare and find the largest one
matrix = [[0] * n for row in range(0, n)] for x in range(0, n):
line = list(map(int, input().split())) #To take input in a sequence
for y in range(0, n): matrix[x][y] = line[y]
i = 0 while(i!=n):
add =0 for j in range(0,n): add = add + matrix[i][j] # adding each element in a row list1.append(add) #apending each value to the list1 i=i+1
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.