Skip to main content

Posts

Showing posts from May, 2020

Prime Numbers Generator Using Python

python program to calculate the prime numbers. prime numbers are those number which are divisible by itself .  for e.g 2 , 3 ,5,7,11,13... etc are prime numbers. can you guess the output of the following program.??????  if yes please do comment .. def chechPrime (n): if n<= 1 : return False for i in range ( 2 , n): if n%i== 0 : return False else : return True for n in range ( 20 ): print (chechPrime(n) , n)