diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..1c4181a --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Mysteryhelfer.pyw b/Mysteryhelfer.pyw index 47b8bfd..4af8315 100644 --- a/Mysteryhelfer.pyw +++ b/Mysteryhelfer.pyw @@ -166,6 +166,7 @@ def dec_to_deg(lat_dec, lon_dec): # ***ReverseWherIGo zu Dezimalgrad def rwig_to_coords(a, b, c): + lat, lon = 0, 0 a = int(a) b = int(b) c = int(c) @@ -465,15 +466,13 @@ wiedergegeben.""" + "\n\n") if i.upper() not in abcgross: atxt = atxt + i # nicht codierbare Zeichen direkt zur Ausgabe bitte! continue - if i == i.upper(): - abc = abcgross + abc = abcgross if i == i.lower(): abc = abcklein - abcl = len(abc) - for j in range(abcl): + for j in range(26): if i == abc[j]: - if j + r >= abcl: - atxt = atxt + abc[j + r - abcl] + if j + r >= 26: + atxt = atxt + abc[j + r - 26] else: atxt = atxt + abc[j + r] Ausgabe.insert(1.0, " " + atxt + "\n") @@ -1630,10 +1629,10 @@ Primzahl ist. n = n // i if i > n: break + out = "Die Zahl {} hat folgende Primfaktoren:\n".format(eingabetext) if not faktoren: Ausgabe.insert(1.0, "Die Zahl {} ist eine Primzahl!!\n".format(eingabetext)) else: - out = "Die Zahl {} hat folgende Primfaktoren:\n".format(eingabetext) for z in faktoren: out += str(z) + ", " return Ausgabe.insert(1.0, out[:-2] + "\n")