06.prime factors
Prime Number
def isprime(n):
for divisor in range(2,n):
if n % divisor == 0:
return False
return True
primetest(7)
primetest(10)
Write a python program to write prime factors of a number
def primefactors(n):
for i in range(2,n):
while n % i == 0:
if isprime(i):
print (i)
n = n / i
primefactors(200)