Preview:
p=int(input("inter p="))
x=0
n=2
while (n<p):
  if (p%n==0):
    x=1
  n=n+1
if (x==1):
  print("given number is not a prime number")
else:
  print("given number is a prime number")
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