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