pyhon write function determines whether n is a multiple of m

Write a function to determine whether n is a multiple m of
caveats: no matter what the input is entered by the user will be the user's input into a string If you want a certain type of content needs to be cast

def is_multiple(n,m):
    if n % m==0:
        return True
    else:
        return False
n=(int)(input("请输入一个整数"))
m=(int)(input("请输入一个整数"))
print( is_multiple(n,m))

Guess you like

Origin blog.csdn.net/qq_44822951/article/details/92069830