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

Qué tipos de actividades hacen tú y tu familia durante el verano? Describelos en tanto detalle como sea posible.
which of the following is the correct answer??
which of these is mostly likely to help a teen have healthy online behavior
If the core of Jupiter is 30,000 Celsius and it is 5 times hotter than the Sun, what's the temperature of the surface of the Sun? Help!
In “Dover Beach” by Matthew Arnold, where are the speaker and his love when the poem begins? A. looking from a window at the white cliffs of Dover out to sea B.
what was a major similarity between china's and Vietnam's resistance to domination by European imperial powers during the late 19th century
C4 plants occurs more commonly in desert conditions because?
Qué tipos de actividades hacen tú y tu familia durante el verano? Describelos en tanto detalle como sea posible.
There are 368 employees. If 3/8 are supervisors and 1/4 are trainees, how many employees are supervisors and how many are trainees?
Which of the following is equivalent to the polynomial below? X^2 - 10x + 61 A. (x-(5-6i))(x-(5+6i)) B. (x+(5-6i))(x+(5-6i)) C. (x+(5-6i))(x-(5+6i)) D. (x+(5-6i