blob: acfe7b3df7fa2e1d6a91d7cbd91ebf11100cdb06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
def isPrime(x):
factorlist = []
for n in range(1 , x+1):
if x % n == 0:
factorlist.append(n)
#print(len(factorlist))
if len(factorlist) == 2:
return True
else:
return False
def primeFactors(x):
factorlist = []
for n in range(1 , int(x/2)):
if x % n == 0:
if isPrime(n):
factorlist.append(n)
print(n)
print("Done!")
#print(len(factorlist))
primeFactors(600851475143)
#print(isPrime(5))
|