The divisibility check
An integer number N is divisible by another integer number p if the remainder of the Euclidean division of N by p is equal to 0.
In this is the case, the first number N is a multiple of p and p is a divisor of N.
To quickly find out if a number is divisible by 2, 3, 5, 9, etc, you can use the divisibility rules explained in this page : Divisibility rules
This python program checks whether a relative integer n is divisible by another relative integer p. It returns a Boolean variable: True or False.
The python % operator computes the remainder of the Euclidean division. So if n%p = 0 then p divides n.
def divisibility (n, p):
if ( n%p == 0):