[Tutor] Question on how to do exponents

Alan Gauld alan.gauld at btinternet.com
Tue Feb 7 09:19:10 CET 2012


On 07/02/12 01:01, Nate Lastname wrote:
> Exponents ... are **(or ^)

Not quite the ^ operator is a bitwise XOR...

 >>> 2^2
0
 >>> 2^1
3

pow() is the other way to do exponents.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list