Below is the Python program to check number is Prime.
num = input('Please enter a number:') i = 2 Flag= 0 while i< num: if num%i ==0 Flag= 1 print ("Your number is NOT a prime number!"); i = i + 1 if Flag == 0: print ("Your number is a prime number!");
No comments:
Post a Comment