Complete-Python-3-Bootcamp
Complete-Python-3-Bootcamp copied to clipboard
To check if a number is prime or not
Program to check if a number is prime or not.
n = 3 if n > 1: for i in range(2, int(n/2)+1): if (n % i)== 0: print(num, "is not a prime number") else: print(n, "is a prime number")