12-05-21 09:09 AM
Answered! Go to Answer.
12-05-21 03:09 PM
12-05-21 03:20 PM
import sys
def add(a, b):
result = int(a) + int(b);
return result;
# Addition of numbers
Sum = 0
Sum = add(sys.argv[1], sys.argv[2]);
print(Sum);
12-05-21 03:29 PM
12-05-21 03:29 PM
12-05-21 03:33 PM
12-05-21 03:36 PM
12-05-21 03:40 PM
12-05-21 03:56 PM
12-05-21 03:57 PM
Sum = add(sys.argv[1], sys.argv[2])
12-05-21 04:01 PM
n = len(sys.argv)
# Addition of numbers
Sum = 0
# Using argparse module
for i in range(1, n):
Sum += int(sys.argv)