* Coding
#Pencarian Bilangan Prima
n=int(input("Masukkan Bilangan = "))
for i in range(2,n+1):
if (i==2):
print(i,end=" ")
else:
prima=True
for j in range (2,i):
if(i%j==0):
prima=False
break
if(prima==True):
print(i,end=" ")
n=int(input("Masukkan Bilangan = "))
for i in range(2,n+1):
if (i==2):
print(i,end=" ")
else:
prima=True
for j in range (2,i):
if(i%j==0):
prima=False
break
if(prima==True):
print(i,end=" ")
* Hasil
Silahkan Berkomentar Sesuai Artikel EmoticonEmoticon