1
0

Added option to end program without using ^C

This commit is contained in:
2022-11-04 20:46:00 +01:00
parent 4aa091a3d0
commit ca86debd8c

View File

@@ -27,6 +27,13 @@ while True:
#Ausgabe der Übersetzung, Wort vorhanden #Ausgabe der Übersetzung, Wort vorhanden
print("Das deutsche Wort lautet:", woerter[wort]) print("Das deutsche Wort lautet:", woerter[wort])
# sollen wir die Schleife/Programm beenden?
elif wort == "quit":
# Programm beenden bzw Schleife beenden
print("Wird beendet")
break
# Wort nicht im Dictionary # Wort nicht im Dictionary
else: else: