diff --git a/app.py b/app.py index c6e13ee..75261a9 100644 --- a/app.py +++ b/app.py @@ -5,6 +5,29 @@ import magic import random import string +rechenreihen = { + "1multi": [ "1 · 1", "2 · 1", "3 · 1", "4 · 1", "5 · 1", "6 · 1", "7 · 1", "8 · 1", "9 · 1", "10 · 1", "1 · 2", "1 · 3", "1 · 4", "1 · 5", "1 · 6", "1 · 7", "1 · 8", "1 · 9", "1 · 10" ], + "2multi": [ "1 · 2", "2 · 2", "3 · 2", "4 · 2", "5 · 2", "6 · 2", "7 · 2", "8 · 2", "9 · 2", "10 · 2", "2 · 1", "2 · 3", "2 · 4", "2 · 5", "2 · 6", "2 · 7", "2 · 8", "2 · 9", "2 · 10" ], + "3multi": [ "1 · 3", "2 · 3", "3 · 3", "4 · 3", "5 · 3", "6 · 3", "7 · 3", "8 · 3", "9 · 3", "10 · 3", "3 · 1", "3 · 2", "3 · 4", "3 · 5", "3 · 6", "3 · 7", "3 · 8", "3 · 9", "3 · 10" ], + "4multi": [ "1 · 4", "2 · 4", "3 · 4", "4 · 4", "5 · 4", "6 · 4", "7 · 4", "8 · 4", "9 · 4", "10 · 4", "4 · 1", "4 · 2", "4 · 3", "4 · 5", "4 · 6", "4 · 7", "4 · 8", "4 · 9", "4 · 10" ], + "5multi": [ "1 · 5", "2 · 5", "3 · 5", "4 · 5", "5 · 5", "6 · 5", "7 · 5", "8 · 5", "9 · 5", "10 · 5", "5 · 1", "5 · 2", "5 · 3", "5 · 4", "5 · 6", "5 · 7", "5 · 8", "5 · 9", "5 · 10" ], + "6multi": [ "1 · 6", "2 · 6", "3 · 6", "4 · 6", "5 · 6", "6 · 6", "7 · 6", "8 · 6", "9 · 6", "10 · 6", "6 · 1", "6 · 2", "6 · 3", "6 · 4", "6 · 5", "6 · 7", "6 · 8", "6 · 9", "6 · 10" ], + "7multi": [ "1 · 7", "2 · 7", "3 · 7", "4 · 7", "5 · 7", "6 · 7", "7 · 7", "8 · 7", "9 · 7", "10 · 7", "7 · 1", "7 · 2", "7 · 3", "7 · 4", "7 · 5", "7 · 6", "7 · 8", "7 · 9", "7 · 10" ], + "8multi": [ "1 · 8", "2 · 8", "3 · 8", "4 · 8", "5 · 8", "6 · 8", "7 · 8", "8 · 8", "9 · 8", "10 · 8", "8 · 1", "8 · 2", "8 · 3", "8 · 4", "8 · 5", "8 · 6", "8 · 7", "8 · 9", "8 · 10" ], + "9multi": [ "1 · 9", "2 · 9", "3 · 9", "4 · 9", "5 · 9", "6 · 9", "7 · 9", "8 · 9", "9 · 9", "10 · 9", "9 · 1", "9 · 2", "9 · 3", "9 · 4", "9 · 5", "9 · 6", "9 · 7", "9 · 8", "9 · 10" ], + "10multi": [ "1 · 10", "2 · 10", "3 · 10", "4 · 10", "5 · 10", "6 · 10", "7 · 10", "8 · 10", "9 · 10", "10 · 10", "10 · 1", "10 · 2", "10 · 3", "10 · 4", "10 · 5", "10 · 6", "10 · 7", "10 · 8", "10 · 9" ], + "Qmulti": [ "1 · 1", "2 · 2", "3 · 3", "4 · 4", "5 · 5", "6 · 6", "7 · 7", "8 · 8", "9 · 9", "10 · 10" ], + "1div": [ "1 : 1", "2 : 1", "3 : 1", "4 : 1", "5 : 1", "6 : 1", "7 : 1", "8 : 1", "9 : 1", "10 : 1"], + "2div": [ "2 : 2", "4 : 2", "6 : 2", "8 : 2", "10 : 2", "12 : 2", "14 : 2", "16 : 2", "18 : 2", "20 : 2" ], + "3div": [ "3 : 3", "6 : 3", "9 : 3", "12 : 3", "15 : 3", "18 : 3", "21 : 3", "24 : 3", "27 : 3", "30 : 3" ], + "4div": [ "4 : 4", "8 : 4", "12 : 4", "16 : 4", "20 : 4", "24 : 4", "28 : 4", "32 : 4", "36 : 4", "40 : 4" ], + "5div": [ "5 : 5", "10 : 5", "15 : 5", "20 : 5", "25 : 5", "30 : 5", "35 : 5", "40 : 5", "45 : 5", "50 : 5" ], + "6div": [ "6 : 6", "12 : 6", "18 : 6", "24 : 6", "30 : 6", "36 : 6", "42 : 6", "48 : 6", "54 : 6", "60 : 6" ], + "7div": [ "7 : 7", "14 : 7", "21 : 7", "28 : 7", "35 : 7", "42 : 7", "49 : 7", "56 : 7", "63 : 7", "70 : 7" ], + "8div": [ "8 : 8", "16 : 8", "24 : 8", "32 : 8", "40 : 8", "48 : 8", "56 : 8", "64 : 8", "72 : 8", "80 : 8" ], + "9div": [ "9 : 9", "18 : 9", "27 : 9", "36 : 9", "45 : 9", "54 : 9", "63 : 9", "72 : 9", "81 : 9", "90 : 9" ], + "10div": [ "10 : 10", "20 : 10", "30 : 10", "40 : 10", "50 : 10", "60 : 10", "70 : 10", "80 : 10", "90 : 10", "100 : 10" ], +} app = Flask(__name__) app.secret_key = 'eng5iikeiwah3lae4idoo0woh4eiy6Th' @@ -15,10 +38,7 @@ def index(): alle = [] zufall = [] for r in request.form.getlist('rechenreihen'): - for i in range(1,11): - alle.append({str(r)+"x"+str(i): int(r)*int(i) }) - alle.append({str(i)+"x"+str(r): int(r)*int(i) }) - + alle.extend(rechenreihen[r]) while len(alle): zufall.append(alle.pop(random.randint(0,len(alle)-1))) return render_template('arbeitsblatt.html',aufgaben=zufall) diff --git a/templates/arbeitsblatt.html b/templates/arbeitsblatt.html index b0c7e90..d5952ac 100644 --- a/templates/arbeitsblatt.html +++ b/templates/arbeitsblatt.html @@ -3,9 +3,7 @@ {% block content %}
{% for a in aufgaben %} - {% for k in a %} -
{{ k }} =
- {% endfor %} +
{{ a }} =
{% endfor %}
{% endblock %} \ No newline at end of file diff --git a/templates/generator.html b/templates/generator.html index a9f3dbf..aebe1cb 100644 --- a/templates/generator.html +++ b/templates/generator.html @@ -3,30 +3,41 @@ {% block content %}
- - 1er Reihe
- 2er Reihe
- 3er Reihe
- 4er Reihe
- 5er Reihe
- 6er Reihe
- 7er Reihe
- 8er Reihe
- 9er Reihe
- 10er Reihe
- + + + + + +
+
+ Multiplikation (·) + 1er Reihe
+ 2er Reihe
+ 3er Reihe
+ 4er Reihe
+ 5er Reihe
+ 6er Reihe
+ 7er Reihe
+ 8er Reihe
+ 9er Reihe
+ 10er Reihe
+ Quadratzahlen
+
+
+
+ Division (:) + 1er Reihe
+ 2er Reihe
+ 3er Reihe
+ 4er Reihe
+ 5er Reihe
+ 6er Reihe
+ 7er Reihe
+ 8er Reihe
+ 9er Reihe
+ 10er Reihe
+
+