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

which of the following is a type of evidence? 1.empirical 2.statistical 3.anecdotal A. 1 only B. 1 and 2 C. 2 and 3 D. 1, 2,and 3
name three different types of turbines used in hydroelectric power
25% of 176 is what number?
What does states' rights refer to? a. the attempt to overthrow the federal government by the states b. the idea that each state has the right to allow or not al
if you didnt have a protractor how could you reconstruct a quarter if it from 0 to 90
what was created out of sandy river deposits?
Evelyn has $524.96 in her checking account. She must maintain a $500 balance to avoid a fee. She wrote a check for $32.50 today. Write and solve an inequality t
What are two most important processes in the cycling of oxygen in and out of the atmosphere?
Which of the following represents "the difference between a number and eight is twenty-two"?
Tickets to a play cost $14 each by mail, plus a $2 processing fee for each order of one or more tickets. Write a rule to describe total cost as a function of t