Python from math import log ... ValueError: math domain error

  • 0

    I've included 'from math import log' and am getting an error with 'math domain error' .. any suggestions?

  • -3

    You can't import anything. Just assume what you need is already there, but if it's not, sorry no one can help you.

  • 1

    Try this on a Python interpreter.

    >> print math.log(10)
    >> print math.log(0)
    Line 5: ValueError: math domain error

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.