[Tutor] Question on how to do exponents

Sarma Tangirala tvssarma.omega9 at gmail.com
Tue Feb 7 17:54:37 CET 2012


On 7 February 2012 13:49, Alan Gauld <alan.gauld at btinternet.com> wrote:

> 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.
>
>
Is is better to use pow() against **?


> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> ______________________________**_________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor>
>



-- 
Sarma Tangirala,
Class of 2012,
Department of Information Science and Technology,
College of Engineering Guindy - Anna University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120207/5a79e503/attachment.html>


More information about the Tutor mailing list