When working with different functions, then there may be a situation when a function is not properly called or invoked. You can face an error like;
“TypeError: ‘float’ object is not callable”.
This may be due to calling a float variable or object that is not callable.
This may be due to syntax error or incorrect function definition.
What this error try to tell us?
This error is trying to tell us that the function you are trying to call is not a function object anymore. It is a different object and that object is not callable.
How to fix this error:
We can look for a variable that shares the same name as the function name and change the name to something else.
However, there are some cases when you cannot find the variable name. For example, In a juypter notebook, if you define a variable, it stays defined until you start kernel again and delete that variable. So there are chances that you define a variable named float and removed it from your code. However since it is not removed from the global scope, then you will keep getting the error.
How to delete a global scope variable?
A quick way to delete the global scope variable is to put del keyword at the start of variable definition.
In your case you can change program like;
from __future__ import division
x = 6.86
y = 9.79
z = 3.03