benutzt habe, gibt der Skript keine Fehler wieder, macht aber auch nichts:
Code: Alles auswählen
#!/usr/bin/env python
#<<<murph>>>
import random
#at first, we generate 9*9 digits of random
#a and c are two counters, a is the row left-right, c is the row up-down
def digitgenerator():
a = 1
c = 1
while a < 9:
while c < 9:
zahl[a/c] = random.randint(1,9)
c+=1
a+=1
#now we have a lot of number created by random, but we have to get the digits from 1 till 9
#with every digit, so we test the row a
def linegenerator():
za = 1
zc = 1
x = 1
while za < 9:
while zc < 9:
while x < 9:
if zahl[a/c] == zahl[x/zc]:
if zahl[a/c] < 1:
zahl[a/c]-=1
elif zahl[a/c] == 1:
zahl[a/c] = 9
x +=1
x = 0
while x < 9:
if zahl[a/c] == zahl[za/x]:
if zahl[a/c] < 1:
zahl[a/c]-= 1
elif zahl[a/c] == 1:
zahl[a/c] = 9
zc +=1
za +=1
def ausgabe():
za = 1
zb = 1