Write a Python function that takes a number as a parameter and check the number is prime or not. I have used python 3.7 compiler for debugging purpose.
def test_prime(num): if (num==1): return False elif (num==2): return True; else: for x in range(2, num): if(num % x==0): return False return True print(test_prime(167))
27 July 2019 2680 Written By: Rohit
© 2020 Tech Study. All rights reserved | Developed by Tech Study| Privacy Policy | Sitemap