Monday, August 19, 2013

Exponentiation in Python

If you using Python as calculator, probably you have already tried to use "^" as exponentiation, because you are used to do it in VBA, and it did not work.

So, use "**" as exponentiation and you will get the right result.




Now you are wondering: "Isn't it two times the multiplication symbol?!?"
In order to answer you: " Yes, it is! But do not worry in several programming languages this two times multiplication symbol acts as exponentiation instead of the instinctive "^" ".

No comments: