You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to add a functionality to compile the code against multiple test cases. any ideas how can i do so.
example:
i have a python code
def simpleArraySum(n,ar):
s = 0
for i in ar:
s += i
return s
n = int(raw_input().strip())
ar = map(int, raw_input().strip().split(' '))
result = simpleArraySum(n,ar)
print(result)
i want to test it against more then one inputs i.e. 6\n1 2 3 4 5 6 and 5\n5 6 9 8 7
The text was updated successfully, but these errors were encountered:
i want to add a functionality to compile the code against multiple test cases. any ideas how can i do so.
example:
i have a python code
def simpleArraySum(n,ar):
s = 0
for i in ar:
s += i
return s
n = int(raw_input().strip())
ar = map(int, raw_input().strip().split(' '))
result = simpleArraySum(n,ar)
print(result)
i want to test it against more then one inputs i.e. 6\n1 2 3 4 5 6 and 5\n5 6 9 8 7
The text was updated successfully, but these errors were encountered: