From 2167f8025e5e74c1bc0731b07a6f3934b5229885 Mon Sep 17 00:00:00 2001 From: ElenaRJ Date: Wed, 17 Jun 2026 16:03:42 +0200 Subject: [PATCH] Frage-Formular --- app/app.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/app.py b/app/app.py index 4993135..a4168d4 100644 --- a/app/app.py +++ b/app/app.py @@ -6,5 +6,14 @@ app = Flask(__name__) def hello(): return "Hallo aus meiner Flask-App! Willkommen in unseren Escape Room! Wuhuuuu es wird Gruselig" +@app.route("/frage", methods=["GET", "POST"]) +def frage(): + if request.method == "POST": + if request.form["antwort"] == "8": + return "Richtig!" + return "Leider falsch." + return '
Was ist 3 + 5? ' \ + '
' + if __name__ == "__main__": app.run(host="0.0.0.0", port=9008) # 90 + Raumnummer (Wir: 08) \ No newline at end of file