
Bradley T. answered 07/26/23
Tutor for Python and High School and Middle School Math
float() is able to convert to string to a float. The problem here is caused because the program evaluates in to out. It first tries radians(self.lat) and fails so it raises that error. The fix would be to first convert the string self.lat to a float before putting it into the radians function. So switch the order of evaluation.
radians(float(self.lat))