Week 24 - Prime numbers
Post date: Jun 2, 2017 8:14:28 PM
def prime(number):
if number > 1:
for x in range(2,number):
if (number % x) == 0:
return False
else:
return True
sum = 0
for x in range(1, 10000):
if prime(x):
sum += x
print (sum)
for x in range(700,799):
if prime(x):
sX = str(x)
prod = int(sX[0]) * int(sX[1]) * int(sX[2])
print(sX, prod)