I ran it, got this:
$ ./trash.py
a=3
b=2
c=1
Traceback (most recent call last):
File "./trash.py", line 7, in <module>
posQuad=(-b+sqrt(b**2-4*a*c))/2*a
ValueError: math domain error
$ ./trash.py
a=1
b=5
c=1
-0.20871215252208009, -4.7912878474779195
$
You're not running into an error about not declaring math. That's a math domain error. If your error was about the module, you'd get a NameError. Python doesn't make assumptions like you think it does. If you used sqrt without importing it, it wouldn't tell you shit about the "math" module, it would just complain that it doesn't know what sqrt is. Think about what a "domain" is in math. The problem is that you are using numbers that make your determinant negative, which means you're running a square root of a negative, which python's math module can't do.
A bigger issue is your order of operations is fucked up. Quadratic equation is x = (-b +/- sqrt((b^2) - (2ac)))/(2a). The way you have it there is wrong because order of operations places multiplication on the same precedence as division, which multiplies a after the division, effectively putting a in the numerator.