From 8a1d0fc79c84cda834f887aba2d281704c32999a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manolo=20Hernandez=20L=C3=BCtten?= Date: Mon, 1 Jun 2026 16:51:19 +0000 Subject: [PATCH] =?UTF-8?q?altGoal.py=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- altGoal.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 altGoal.py diff --git a/altGoal.py b/altGoal.py new file mode 100644 index 0000000..88e627b --- /dev/null +++ b/altGoal.py @@ -0,0 +1,23 @@ +print("Hallo! Ich bin ein Chatbot.") +name = input("Wie heißt du?: ") + +promptsAndAnswers = { + "hallo" : "Hallo!", + "wie gehts" : "Gut", + "bye" : "Tschüss" +} + +print("Hallo", name) + +while True: + text = input("Nachricht eingeben: ") + + try: + print(promptsAndAnswers[text]) + except somethingElse: + print("Das verstehe ich nicht.") + + if text == "bye": + print("Tschüss!") + break +