139k views
5 votes
Write a method is_divisible that takes two integers, m and n. The method returns True if m is divisible by n, and returns False otherwise. Test cases for this function to verify it functions correctly.

User Akamaozu
by
3.6k points

1 Answer

2 votes

Answer:

def is_divisible(m,n):

if(m%n==0):

return True

else:

return False

m=int(input("Enter m:"))

n=int(input("Enter n:"))

print(is_divisible(m,n))

Step-by-step explanation:

User Fernando Gabrieli
by
3.8k points