Click to See Complete Forum and Search --> : Python: sqrt operation


CelestiaLegends
03-06-2003, 04:46 PM
I've been trying over and over in diffrent combinations, from defining a function to printing just the results but nothing seems to work...

form math import sqrt

return sqrt(aasdf)

TypeError: bad argument type for built-in operation

does anyone now how to get the square root operation to work?

Strike
03-07-2003, 01:11 PM
Well, what are you feeding to sqrt()? If it's not an int or a float, I would expect it to return that error. Make sure you aren't passing it a string, for example.

CelestiaLegends
03-07-2003, 04:57 PM
It worked! thank you, I can't believe I overlooked such a simple solution. Really appreciated.