donovanfiler7361 donovanfiler7361
  • 19-03-2020
  • Computers and Technology
contestada

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.

Respuesta :

abdullahfarooqi
abdullahfarooqi abdullahfarooqi
  • 22-03-2020

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))

Explanation:

Answer Link

Otras preguntas

2700=2300(1+r)^5 solve for r Please show all work
Which microscope did Robert Hooke use to study tree bark
describe in your own words what is a 'fat cat'?
On a shopping trip, Peter spent 1/3 of his money for a jacket and another $5 for a hat. If peter still had 1/2 of his money left, how much money did he have ori
whats 30 divided by 6/7
what is case-based reasoning?
What kind of organic compound is oxybenzone?
if 2x=4 what is the value of x
what is 98% as a fraction
Do you add them both together or multiply or do u put an equal sign between them? what is the sum of [tex] \frac{-x+7}{2x+4} [/tex] and[tex] \frac{2x+5}{2x+4} [