Functions · Intermediate · 55 XP · about 5 min
Write a function called multiply_all(*args) that takes any number of arguments and returns their product (all multiplied together).
multiply_all(2, 3) # Returns 6 multiply_all(1, 2, 3, 4) # Returns 24 multiply_all(5) # Returns 5 multiply_all() # Returns 1 (empty product)
Ready?
Accept the challenge to start writing. A small timer counts the time this page is in view.
Output appears here.