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

How much must I deposit today if I want to be able to withdraw $620 per month for six years from an account which earns a nominal rate of three percent, compoun
I need help someone​
In a 1946 speech, Winston Churchill used the term "Iron Curtain" to describe differences in eastern and western Europe. Which difference was he specifically ref
What was the name of the split between Eastern Europe and Western Europe?
5.3N - 3.7= 12.2?????
The Golgi apparatus is made up of an ordered series of compartments. To process N-linked oligosaccharides, different Golgi compartments carry different enzymes
An archer pulls the bowstring back for a distance of 0.470 m before releasing the arrow. The bow and string act like a spring whose spring constant is 425 N/m.
A spinner with 10 equally sized slices is shown below. (2 slices are black, 4 are grey, and 4 are white.) The dial is spun and stops on a slice at random. What
Owner made no investments in the business, and no dividends were paid during the year. Owner made no investments in the business, but dividends were $850 cash p
Revolutionary war essay