Advertisement
Jamesbusayo

Untitled

Feb 22nd, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def product(numbers):
  2.     num_product = 1
  3.     for number in numbers:
  4.         num_product = num_product * number
  5.     return num_product
  6.  
  7. print(product([1, 2, 3]))
  8. print(product([4, 5, 6, 7]))
  9. print(product([10]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement