num = 15
flag = 0
for i in range(2,num):
if num%i==0:
flag = 1
break
if flag == 1:
print('Not Prime')
else:
print("Prime")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter