typeerror: a float is required,x = float(x)