Computer Science, asked by fawzan1207, 3 months ago

WAP to find the check whether the given number is a prime or not.

Answers

Answered by alphinfrancis25
2

Answer:

num=int(input('enter the number:'))

stat=False

if num > 1:

       for i in range(2,num):

                    if num%i == 0:

                             stat=True

                             break

if stat :

     print( num,'is not a prime number')

else:

     print( num,'is a prime number')

Hope This Helps You

     

Similar questions