Product of iterable
Created on Jan. 16, 2017 by Julien Palard
Write a function called mul
taking a single iterable argument.
The function have to multiply all values from the given iterable.
As an example mul([1, 2, 3])
should compute 1 × 2 × 3.
It is not usefull to use print
in this kind of functions (you can still, for debugging purpose),
better use return
so the result is given back to the caller, and can be used again.
It could then be used like:
1 2 3 4 |
|
There's no corrections yet, hit the `Submit` button to send your code to the correction bot.
Keyboard shortcuts:
- Ctrl-Enter: Send your code to the correction bot.
- Escape: Get back to the instructions tab.