From 16dc93b89e28df175950b7bf8e70171547b4a55c Mon Sep 17 00:00:00 2001 From: tebarius Date: Wed, 16 Aug 2023 12:46:52 +0200 Subject: [PATCH] =?UTF-8?q?pycharm=20bem=C3=A4ngelt=20nur=20noch=20rechtsc?= =?UTF-8?q?hreibung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/encodings.xml | 6 ++++++ Mysteryhelfer.pyw | 13 ++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .idea/encodings.xml 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")