178k views
5 votes
Write a short Python function, is_multiple(n, m), that takes two integer values and returns True is n is a multiple of m, that is, n = mi for some integer i, and False otherwise. A common punishment for school children is to write out a sentence multiple times. Write a Python stand-alone program that will write the following sentence one hundred times: "I will never spam my friends again."

1 Answer

4 votes

Answer:

first:

def is_multiple(n, m):

return (m % n) == 0

second:

for i in range(100):

print "I will never spam my friends again."

User Hanmari
by
4.7k points