Question: Debugging CAT 1 Debugging 12 Debug the following code such that the add function can take any number of arguments (>=2). Given 'n arguments, the

CAT 1 Debugging 12 Debug the following code such that the add function can take any number of arguments (>=2). Given 'n arguments, the function should find sum of last (n-2) arguments. Font Size Language Editor Theme 18 . Choose a langauge Select a Theme WNE 1 def add(a,b): sum = 0 for i in : sumi return sum C = a = int(input()) b int(input()) int(input()) d = int(input()) int(input() print(add(a,b)) print(add(a,b,c)) print(add(a,b,c,d)) print(add(a,b,c,d,e)) e = Click here to check code with your own input/out Execute Code Save Pause Test Reset code or get last saved (Caution: You may los Status
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
