1. 程式人生 > >查詢x,y之間的素數

查詢x,y之間的素數

def sum_ss(x, y):
    ss = []

    for i in range(x, y+1):
        k = 0

        for j in range(2, i):
            if i % j == 0:
                k = 1
       
        if k == 0:
            ss.append(i)

    return ss