very newbie questions

Gerrit Holl gerrit at NOSPAM.nl.linux.org
Sun Oct 22 16:05:04 EDT 2000


On 30 Sep 2000 20:16:49 GMT, AquaRock7 wrote:
> How do you write an exponent sign in python (ie how do u write 16 x 16 in
> exponential form?)

16 ** 16

> WHat does the '%' operation do?

>>> divmod(7,3)
(2, 1)
>>> 7/3
2
>>> 7%3
1

It calculates the rest.

> One more thing...  How do you turn a string into numerical data to do math on

>>> int('2') + int('3')
5

> (I have to use the raw_input() command, b/c they enter a # in hexadecimal) then
> turn the numerical data back into a string?
> 
> Please reply to
> dustin at getzfamily.inbox.as
> 
> Thanks!
> Dustin


-- 
****************************************************************************
*  Save Mother Earth! -- Earth First! -- visit http://www.earthfirst.org/!
****************************************************************************



More information about the Python-list mailing list