I assumed it wrote Python or some sort of other code.
Usually yes
writing and calling an entire python setup seems massive overkill, surely just have an internal way of calling a simple calculator function would be millions of times faster
Usually yes