[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

returning totals in functions of math

Errors say that add takes 1 positional argument but 3 were given? Does this
limit how many numbers I can have or do I need other variables?
Here is what I have:
def add(numbers):
   total = 1
   for x in numbers:
          total += x
   return total
print(add(1999, -672, 84))

I have a multiply function above it but that was solved and I'm trying to
figure everything out for each of the different math functions.
Thank you