Question: Ex: If the input is: 3 1 5 4 3 2 4 8 6 7 5 2 2 3 9 1 6 then the output
Ex: If the input is:
then the output is:
All numbers:
Sum of each row:
Note: sumalist returns the sum of all the elements in alist given that alist contains numbers only.
numrows intinput
datalist
for i in rangenumrows:
datalist.appendintx for x in inputsplit
computedlist
printfAll numbers: datalist
printfSum of each row: computedlist
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
