Computer Science, asked by srijitadey2106, 4 months ago

5. Input a number then find it is prime number or not.

Answers

Answered by yadavashish211104
0

Answer:

Python program

i=int(input("Enter a number:"))

j=2

while j <= i/2:

   if i % j == 0:

       break

   j += 1

if j > i/j:

   print("The given number is a prime number")

else:

   print("The given number is not a prime number")

for more python program and 3D printing visit:

https://www.filamenting.com/blog

Explanation:

Similar questions