Matt Smith wrote: > import sys, pygame, math > > ... > > if ypos >= 384 and velocity > 0: > impactvel = sqrt(velocity ** 2 + (2 * gravity * (ypos - 384 * > 160))) > > ... > > > Traceback (most recent call last): > File "<stdin>", line 32, in <module> > ValueError: math domain error
Apologies, the actual error I get when I run the code above is: Traceback (most recent call last): File "<stdin>", line 31, in <module> NameError: name 'sqrt' is not defined The error I quoted first was when I tried to call 'math.sqrt(x)' Matt _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor