n=int(input('enter number:')) if(n==1): print(n,'not a prime number') else: for i in range(2,n): if (n%i==0): print(n,'not a prime number') break else: print(n,'prime number')
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