Write a Python Program to Check if given number is prime or not. Also find factorial of the given no using user defined function.
import math
def fact(n):
return(math.factorial(n))
print("Factorial of", num, "is", f)
def checkPrime(x):
for i in range(2, x):
if num%i==0:
return 1
p = checkPrime(num)
if p==1:
print("\n"
+str(num)+ " is not a Prime Number")
else:
print("\n"
+str(num)+ " is a Prime Number")