write a python programm to print 1 to 100 prime number

 # write a python programm to print 1 to 100  prime number

a=1
while a<=100:
    i=1
    count=0
    while i<=a:
        if a%i==0:
            count=count+1
        i+=1
    if count==2:
        print(a)
    a+=1

   

Comments

Popular posts from this blog

Write a python script to display the current date and time. First create variables to store date and time, then display date and time in proper format (like: 13-8-2022 and 9:00 PM """