Answer:
def volume(n1, n2, n3):
product = n1 * n2 * n3
return product
def sum_of_nums(*args):
total = 0
for n in args:
total += n
return total
print("The product: " + str(volume(2, 3, 4)))
print("The sum: " + str(sum_of_nums(1, 2, 3, 4, 5)))
Step-by-step explanation:
Create a function called volume that takes three parameters, n1, n2, n3
Multiply the n1, n2, n3 and set it to product
Return the product
Create a function called sum_of_nums that takes *args as parameter (Since the function may take one or more arguments, we may use *args)
Initialize the total as 0
Create a for loop that iterate through args. Add each number to the total (cumulative sum)
When the loop is done, return the total
Call the functions with given numbers and print the results
*See the output in the attachment.