From d4851a961ade13e5115fec0a90aca44db59c216e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manolo=20Hernandez=20L=C3=BCtten?= Date: Fri, 5 Jun 2026 14:44:13 +0200 Subject: [PATCH] Restructured the entire folder and added this lesson's examples --- Stunde 1/Ergebnisse/Calculator.py | 17 +++++++++++++++++ Stunde 1/Ergebnisse/Chatbot.py | 18 ++++++++++++++++++ Stunde 1/Ergebnisse/EnterValue.py | 10 ++++++++++ Stunde 1/Ergebnisse/EnterValue2.py | 20 ++++++++++++++++++++ example.py => Stunde 1/Planung/Basics.py | 0 goal.py => Stunde 1/Planung/chatbot.py | 0 altGoal.py => Stunde 2/Planung/ChatbotV2.py | 0 7 files changed, 65 insertions(+) create mode 100644 Stunde 1/Ergebnisse/Calculator.py create mode 100644 Stunde 1/Ergebnisse/Chatbot.py create mode 100644 Stunde 1/Ergebnisse/EnterValue.py create mode 100644 Stunde 1/Ergebnisse/EnterValue2.py rename example.py => Stunde 1/Planung/Basics.py (100%) rename goal.py => Stunde 1/Planung/chatbot.py (100%) rename altGoal.py => Stunde 2/Planung/ChatbotV2.py (100%) diff --git a/Stunde 1/Ergebnisse/Calculator.py b/Stunde 1/Ergebnisse/Calculator.py new file mode 100644 index 0000000..4ca9c7a --- /dev/null +++ b/Stunde 1/Ergebnisse/Calculator.py @@ -0,0 +1,17 @@ +while True: + number1 = float(input("Enter first number: ")) + mode = input("Select action: ") + number2 = float(input("Enter second number: ")) + + match mode: + case "*": + print("Result: ", number1 * number2) + + case "/": + print("Result: ", number1 / number2) + + case "+": + print("Result: ", number1 + number2) + + case "-": + print("Result: ", number1 - number2) diff --git a/Stunde 1/Ergebnisse/Chatbot.py b/Stunde 1/Ergebnisse/Chatbot.py new file mode 100644 index 0000000..35417f1 --- /dev/null +++ b/Stunde 1/Ergebnisse/Chatbot.py @@ -0,0 +1,18 @@ +while True: + userInput = input("Nachricht: ") + + if userInput == "Hallo" or userInput == "Hi" or userInput == "Moin": + print("Antwort: Hallo") + + elif userInput == "Wie geht's" or userInput == "Wie gehts": + print("Antwort: Gut") + + elif userInput == "Wer bist du": + print("Antwort: Ein Chatbot") + + elif userInput == "Bye" or userInput == "Ciao" or userInput == "Tschüss": + print("Antwort: Bye") + break + + else: + print("Antwort: Das habe ich leider nicht verstanden") diff --git a/Stunde 1/Ergebnisse/EnterValue.py b/Stunde 1/Ergebnisse/EnterValue.py new file mode 100644 index 0000000..e887760 --- /dev/null +++ b/Stunde 1/Ergebnisse/EnterValue.py @@ -0,0 +1,10 @@ +a = int(input("Gib einen Wert ein: ")) + +if a > 0: + print("Der Wert a =", a, "ist größer als 0") + +elif a < 0: + print("Der Wert a =", a, "ist kleiner als 0") + +else: + print("Der Wert ist 0") \ No newline at end of file diff --git a/Stunde 1/Ergebnisse/EnterValue2.py b/Stunde 1/Ergebnisse/EnterValue2.py new file mode 100644 index 0000000..7c0912e --- /dev/null +++ b/Stunde 1/Ergebnisse/EnterValue2.py @@ -0,0 +1,20 @@ +a = int(input("Gib einen Wert ein: ")) + +if a != 0: + print("Der Wert ist nicht 0") + + if a > 0: + print("Der Wert a =", a, "ist größer als 0") + + elif a < 0: + print("Der Wert a =", a, "ist kleiner als 0") + + else: + print("Error") + +elif a == 0: + print("Der Wert ist 0") + +else: + print("Error") + diff --git a/example.py b/Stunde 1/Planung/Basics.py similarity index 100% rename from example.py rename to Stunde 1/Planung/Basics.py diff --git a/goal.py b/Stunde 1/Planung/chatbot.py similarity index 100% rename from goal.py rename to Stunde 1/Planung/chatbot.py diff --git a/altGoal.py b/Stunde 2/Planung/ChatbotV2.py similarity index 100% rename from altGoal.py rename to Stunde 2/Planung/ChatbotV2.py