How to fix ValueError: math domain error (negative number cannot have a square root) in Python | DevErrors