> I've imported > both math and cmath and still I can't get that darn function to work. > What is the problem here? It's not enough to import math unless you bring the sqrt function into the global namespace by doing either: >>> from math import sqrt >>> sqrt(4) 2.0 or: >>> import math >>> math.sqrt(4) 2.0