问题描述
我需要一些帮助来查找此功能中的错误:
def is_coprime(num_1,num_2):
"""Function that returns true if 2 integers are coprime. """
if num_1 > num_2:
small = num_2
else:
small = num_1
for i in range(1,small + 1):
if ((num_1 % i == 0) and (num_2 % i != 0)):
gcd = i
if (gcd == 1):
return True
else:
return False
希望缩进效果还不错。我认为我的错误在于if条件,但我不知道是什么。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)