-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3 Prime Number
More file actions
34 lines (30 loc) · 893 Bytes
/
3 Prime Number
File metadata and controls
34 lines (30 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# https://www.matematikciler.com/uc-asal-sayi/
#Farklı üç adet 2 basamaklı asal sayımız var.# -Bu üç sayının ortalaması asal sayıdır.
# -Her sayı çiftinin ortalaması asal sayıdır.# Bu üç sayıyı bulunuz.
# sonuc 11 47 ve 71
def is_prime(num):
for x in range(2, num):
if num % x == 0:
break
else:
return num
a=list(range(10,100))
b=[]
for i in a:
if is_prime(i) is not None:
b.append(is_prime(i))
for i in b:
for k in b:
n=(i+k)//2
if n in b and n!=i:
for m in b:
v=(i+k+m)//3
if (is_prime(v) is not None) and (is_prime((k+m)//2) is not None) and (is_prime((i+m)//2) is not None) and k!=m and i!=m:
print(i,k,m)
break
else:
continue
break
else:
continue
break