2018-11-06答疑

最小公倍数逻辑顺序?

def lcm(x,y):
    if x>y:
        greater=x
    else:
        greater=y
    while(True):
        if((greater%x==0)and (greater%y==0)):
            lcm=greater
            break
        greater +=1
        return  lcm

debug的详细使用方法?

问题?

2018-11-06答疑_第1张图片
image.png
def sum13(list_13):
    aaa=0
    for i in list_13:
        if i!=13:
            aaa=aaa+i
        else:
            break
        return aaa
    print(aaa)

你可能感兴趣的:(2018-11-06答疑)