I'm using Python 3.7 and my editor is PyCharm. When I call prod method from math module, it gives the error:
AttributeError: module 'math' has no attribute 'prod'
How can I fix it? (It works for other methods like floor, sqrt and etc. The only problem is prod.)
Here's my piece of code:
import math
numbers = [1, 2, 3, 4]
print(math.prod(numbers))
In general, my question is why this problem happens and how can I handle similar situations?
Thanks.