administrata wrote:

sry, i don't know much about maths

What is % used for?

such as?

Among many other things, you can use it to test whether one integer evenly divides another integer.


For example, to test if a number is odd:

def isodd(x):
    return bool(x % 2)

--
Robert Kern
[EMAIL PROTECTED]

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to