Question: Python Challenge Question We will pass in a 2 dimensional list of numbers. You should add up all the numbers in each row and output
Python Challenge Question
We will pass in a 2 dimensional list of numbers.
You should
add up all the numbers in each row and output that number
output the grand total of all rows
------------------------------------------------------
Requirements:
Program Failed for Input: 1,1,-2 -1,-2,-3 1,1,1 Expected Output: 0 -6 3 -3
------------------------------------------------------
Given Code:
# Get our list from the command line arguments import sys numbers= sys.argv[1:]
# Convert the command line arguments into 2d list for i in range(0,len(numbers)): numbers[i]= numbers[i].split(',') # Write your code below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
