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

Convert 3/11 into a percent?
Why did the slogan Peace Land and Bread appeal to the Russian people?
please solve the following equation. x-6x=56
each year the gardners plant 7/8 of an acre with tomatoes. They sell half of what they grow at a roadside stand. What part of an acre do the gardeners use for t
which process breaks down sugars to make atp when oxygen is present
please solve the following equation. x-6x=56
Convert 3/11 into a percent?
each year the gardners plant 7/8 of an acre with tomatoes. They sell half of what they grow at a roadside stand. What part of an acre do the gardeners use for t
What military strategy defeated Cornwallis at Yorktown?
what is the phenotype of a heterozygous person using T for tall and t for short