i dont know what happend

This commit is contained in:
2026-10-22 19:10:14 +02:00
parent 81b56228d7
commit c6a3393830
11 changed files with 982 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
#import time
print("Prime number calc")
checked = []
primes=[]
now=1
def is_ganz(zahl):
try:
return float(int(zahl)) == zahl
except ValueError:
return False
def is_teilbar(nummer, teiler):
geteilt=nummer/teiler
return is_ganz(geteilt)
while True:
now += 1
#if is_teilbar(now, 50):
# print("[debug]: das ist cheecked:"+str(checked))
if not now in checked:
x=0
for i in checked:
if is_teilbar(now, i):
x += 1
if x==0:
primes.append(now)
print(now)
checked.append(now)
#time.sleep(0.01)