我想检查一个数字是否是第二个数字的倍数。以下代码有什么问题?
def is_multiple(x,y):
if x!=0 & (y%x)==0 :
print("true")
else:
print("false")
end
print("A program in python")
x=input("enter a number :")
y=input("enter its multiple :")
is_multiple(x,y)
错误:
TypeError: not all arguments converted during string formatting
int(input(...
。 - Avinash Rajinput
函数是不同的。 - Holt