Computer Science, asked by sahilss0410, 7 months ago

Seenu have a fruit shop and arranged the some set of fruits in column and row wise. Seenu needs to find the total number of fruits in each rows. Help him to find out.

INPUT & OUTPUT FORMAT:

Input consists of 2 integers and 1 2D-array. Integers correspond to the size of rows and columns.

SAMPLE INPUT & OUTPUT:

3

3

1 2 3

7 3 1

7 4 1

6

11

12

Answers

Answered by poojan
3

Language used : Python Programming

Look at the attachment given below to see the program execution and output generation.

Program :

rows=int(input())

columns=int(input())

l=[]

for i in range(rows):

   l.append(sum(list(map(int,input().split(' ')))))

for i in l:

   print(i)

Input :

3

3

1 2 3

7 3 1

7 4 1

Output :

6

11

12

Learn more :

1. Write a program to accept Basic salary of an employee. Calculate and display his gross salary based on the following information...

https://brainly.in/question/18744315

2.  Write the program for : Raju has a square-shaped puzzle made up of small square pieces containing numbers on them...

brainly.in/question/16956126

3. Printing all the palindromes formed by a palindrome word.

brainly.in/question/19151384

Attachments:
Similar questions