E - CHKFAC.py
Your task is to write a function is_divisible(n, m)
that checks whether the number n
is divisible by m
.
If n
is divisible by m
, return True
; otherwise, return False
.
Input: Two integers n
and m
.
Output: Return True
if n
is divisible by m
, otherwise return False
.
Example 1:
Input: n = 20, m = 5
Return: True
Explanation: Because 20 is divisible by 5.
Example 2:
Input: n = 15, m = 4
Return: False
Explanation: Because 15 is not divisible by 4
Example 3:
Input: n = 18, m = 6
Return: True
Explanation: Because 18 divisible by 6
Example 4:
Input: n = 10, m = 3
Return: False
Explanation: Because 10 is not divisible by 3