Find Prime Numbers between 1 to100.

    0

    0

    CrypticSai-08

    #To find the prime numbers between 1 to 100 
    li=[] #list of prime numbers will be stored here 
    for i in range(2,101):
        f=0
        for j in range(2,i+1):
            if(i!=j and i%j==0): #if any n
                f=1
                break 
        if(f==0):
            li.append(i)
    print('Prime numbers between 1 to 100:')
    print(*li,sep=' ')
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.