du hast in deinem Code mit
import math
die gesamte math Bibliothek geladen
dann sollte sqrt() in math.sqrt() geändert werden