Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ReckonPrimer.activity/exstore.py
diff options
context:
space:
mode:
Diffstat (limited to 'ReckonPrimer.activity/exstore.py')
-rw-r--r--ReckonPrimer.activity/exstore.py253
1 files changed, 157 insertions, 96 deletions
diff --git a/ReckonPrimer.activity/exstore.py b/ReckonPrimer.activity/exstore.py
index a12a77c..8f38fa1 100644
--- a/ReckonPrimer.activity/exstore.py
+++ b/ReckonPrimer.activity/exstore.py
@@ -31,108 +31,169 @@ class ExStore:
self._display = display
self._coach = coach
self._active_exerc = None
- #self._sett = Settings()
- #Provisorium für die "3-Button-Version" vvvvvvvvvvvvvvvvvvvvvvvvv
- #self._data = [(self._sett.get_setting('addsub_simp'), []),
- # (self._sett.get_setting('passten'), []),
- # (self._sett.get_setting('times_div'), [])]
- #Provisorium für die "3-Button-Version" ^^^^^^^^^^^^^^^^^^^^^^^^^
#Provisorium für impl. "treeView-Kollektion" vvvvvvvvvvvvvvvvvvvv
- _ex010 = Task({'topic' : 'addsub_simp',
- 'title' : 'template exaddsimp',
- 'descript': 'addition and subtraction without carry, \
- i.e. without passing the 10 barrier. ',
- 'icon' : None, # for quick reference of the exercise
- 'calclines': 1, # no. of lines for calc to be input.
- 'MAX' : 30, # maximum of calcs generated.
- # Generate fills up by varying input.
- 'MIN' : 20, # minimum of calcs generated UNUSED
- 'min' : 0, # minimum in size of a number in a calc
- 'max' : 1, # maximum in size of a number in a calc
- # 0 <= min <= max <= 10
- '+' : True, # make all additions min..max
- '-' : True, # make all subtactions min..max
- '_+_=_' : True, # = is _right_ from operator, e.g. 1+2=3
- 'input=' : [1,3,5],# list of positions in calc: 1 | 3 | 5
- # where input is possible;
- # actual positions chosen by Generate.
- '_=_+_' : False, # = is _left_ from operator, e.g. 3=1+2
- '=input' : [1,3,5],# analogous to '_+_=_'
- 'shuffle': True, # shuffle _all_ the calcs
- 'cut-max': True # cut set of all calcs down to MAX
- }, [])
- _ex011 = Task({'topic' : 'passten',
- 'title' : 'template expassten',
- 'descript': 'addition and subtraction with carry, \
- i.e. with passing the 10 barrier. ',
- 'icon' : None, # for quick reference of the exercise
- 'calclines' : 1, # or 2 iff 'newline' : True.
- 'MAX' : 150, # maximum of calcs generated;
- # TODO: Generate fills up by varying input.
- 'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
- '+' :True, # + crossing the ten barrier!!
- '-' :False, # - goes below the ten barrier!!!
- # (i.e. iteration on left arg. is "outer" loop)
- 'min' : 2, # +: minimum in size of number in left argument
- #'min' : 5, # +: minimum in size of number in left argument
- # -: minimum in size of result
- 'max' : 2, # +: maximum in size of number in left argument
- # -: maximum in size of result
- #'max' : 9, # +: maximum in size of number in left argument
- 'input' :[3], # list of positions in calc 3 | 5
- # where input is possible;
- # actual positions chosen by Generate.
- 'newline' : True, # display 2nd line for intermediate results
- 'shuffle_all' : False, # shuffle all calcs
- 'shuffle_inner': False, # shuffle only 1st (inner) iteration
- 'cut-max' : True # cut set of all calcs down to MAX
- }, [])
- _ex012 = Task({'topic' : 'times_div', #for programmers only
- 'title' : 'template extimesdiv',
- 'descript': 'multiplication, division and "in" \
- from 2 to 19 and 20 to 190. ',
- 'icon' : None, # for quick reference of the exercise
- 'calclines' : 1, # no. of lines for calc to be input.
- 'MAX' : 50, # maximum of calcs generated;
- # TODO: Generate fills up by varying input.
- 'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
- '*' : False, # eg. 7 . 2 =_
- '*commute' : False, # commute the operands 2 . 7 = _
- ':' : True, # 14 : 2 = _
- 'in' : False, # 2 in 14 = _
- 'remainder' : False, # : | in ... with remainder
- 'vadd' : 0, # 0 or 10, for 1.11 ... 1.19
- 'vmult' : 1, # 1 or 10, for 1.10 ... 1.90
- 'min' : 2, # +: minimum number in right *operand
- # -: minimum result
- 'max' : 2, # +: maximum number in right *operand
- # -: maximum result
- 'factors' : [2,4], # Liste mit ausgewählten zahlen zur berechnung
- 'shuffle_all' : False, # shuffle all calcs
- 'shuffle_inner': False, # shuffle only 1st (inner) iteration
- 'cut-max' : True # cut set of all calcs down to MAX
- }, [])
- _coll00 = Collection("Add Sub: + & -",
- "hier sind alle 1x1-Reihen mit 'in'",
- None, [])
- _coll01 = Collection("Times Division: x & in",
- "hier sind alle 1x1-Reihen mit 'in'",
- None, [_ex010, _ex011, _ex012])
+####### _c1 ##################################################################
+####### _c1c1c1t #############################################################
+ _sett = {'topic' : 'times_div',
+ 'title' : '99-er Reihe',
+ 'descript' : 'settings: series (2,4,8 is possible!) of *, "in" and : with remainder, series 11..19 (left bar),series 10..90 (right long bar), separate shuffling or operands.',
+ 'icon' : None,
+ 'calclines' : 1,
+ 'MAX' : 50,
+
+ 'MIN' : 10,
+ '*' : True,
+ '*commute' : False,
+ ':' : False,
+ 'in' : False,
+ 'remainder' : False,
+ 'vadd' : 0,
+ 'vmult' : 1,
+ 'factors' : [99],
+ 'shuffle_all' : True,
+ 'shuffle_inner': True,
+ 'cut-max' : True
+ }
+ _sett['factors'] = [2]; _sett['title'] = '2-er Reihe'
+ _c1c1c1t2 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [3]; _sett['title'] = '3-er Reihe'
+ _c1c1c1t3 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [4]; _sett['title'] = '4-er Reihe'
+ _c1c1c1t4 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [5]; _sett['title'] = '5-er Reihe'
+ _c1c1c1t5 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [6]; _sett['title'] = '6-er Reihe'
+ _c1c1c1t6 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [7]; _sett['title'] = '7-er Reihe'
+ _c1c1c1t7 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [8]; _sett['title'] = '8-er Reihe'
+ _c1c1c1t8 = Task(copy.deepcopy(_sett), [])
+ _sett['factors'] = [9]; _sett['title'] = '9-er Reihe'
+ _c1c1c1t9 = Task(copy.deepcopy(_sett), [])
+####### _c1c1c2t #############################################################
+# _sett['factors'] = [2,4]; _sett['title'] = '2,4-er Reihe'
+# _c1c1c2t1 = Task(copy.deepcopy(_sett), [])
+# _sett['factors'] = [2,4,8]; _sett['title'] = '2,4,8-er Reihe'
+# _c1c1c2t2 = Task(copy.deepcopy(_sett), [])
+# #_sett['factors'] = [5,10]; _sett['title'] = '-er Reihe'
+# #_c1c1c2t2 = Task(copy.deepcopy(_sett), [])
+# _sett['factors'] = [3,6]; _sett['title'] = '3,6-er Reihe'
+# _c1c1c2t3 = Task(copy.deepcopy(_sett), [])
+# _sett['factors'] = [3,6,9]; _sett['title'] = '3,6,9-er Reihe'
+# _c1c1c2t4 = Task(copy.deepcopy(_sett), [])
+####### _c1c1c3t #############################################################
- _coll02 = Collection("Pass Ten: ->10",
- "hier sind alle 1x1-Reihen mit 'in'",
- None, [])
- _coll0 = Collection("Templates",
- "Hier finden Sie alle verfügbaren Templates",
- None, [_coll00, _coll01, _coll02])
+####### _c2 ##################################################################
+####### _c3 ##################################################################
+ _c3t1 = Task({'topic' : 'addsub_simp',
+ 'title' : 'Template: + - within 10',
+ 'descript' : 'settings: range of result, input at 3 positions, swap around =',
+ 'icon' : None, # for quick reference of the exercise
+ 'calclines': 1, # no. of lines for calc to be input.
+ 'MAX' : 100, # maximum of calcs generated.
+ # Generate fills up by varying input.
+ 'MIN' : 20, # minimum of calcs generated UNUSED
+ 'min' : 0, # minimum in size of a number in a calc
+ 'max' : 1, # maximum in size of a number in a calc
+ # 0 <= min <= max <= 10
+ '+' : True, # make all additions min..max
+ '-' : True, # make all subtactions min..max
+ '_+_=_' : True, # = is _right_ from operator, e.g. 1+2=3
+ 'input=' : [1,3,5],# list of positions in calc: 1 | 3 | 5
+ # where input is possible;
+ # actual positions chosen by Generate.
+ '_=_+_' : False, # = is _left_ from operator, e.g. 3=1+2
+ '=input' : [1,3,5],# analogous to '_+_=_'
+ 'shuffle' : False, # shuffle _all_ the calcs
+ 'cut-max' : True # cut set of all calcs down to MAX
+ }, [])
+ _c3t2 = Task({'topic' : 'passten',
+ 'title' : 'Template: + - passing the 10 barrier',
+ 'descript' : 'settings: range of 1st operand, input left and right from =, input intermediate result, separate shuffling of operands.',
+ 'icon' : None, # for quick reference of the exercise
+ 'calclines' : 1, # or 2 iff 'newline' : True.
+ 'MAX' : 150, # maximum of calcs generated;
+ # TODO: Generate fills up by varying input.
+ 'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
+ '+' :True, # + crossing the ten barrier!!
+ '-' :False, # - goes below the ten barrier!!!
+ #(i.e. iteration on left arg. is "outer" loop)
+ 'min' : 2, # +: minimum in size of number in left argument
+ 'max' : 2, # +: maximum in size of number in left argument
+ 'input' :[3], # list of positions in calc 3 | 5
+ # where input is possible.
+ 'newline' : True, # display 2nd line for intermediate results
+ 'shuffle_all' : False,# shuffle all calcs
+ 'shuffle_inner': False,# shuffle only 1st (inner) iteration
+ 'cut-max' : True # cut set of all calcs down to MAX
+ }, [])
+ _c3t3 = Task({'topic' : 'times_div', #for programmers only
+ 'title' : 'Template: * : "in" series',
+ 'descript' : 'settings: series (2,4,8 is possible!) of *, "in" and : with remainder, series 11..19 (left bar),series 10..90 (right long bar), separate shuffling or operands.',
+ 'icon' : None, # for quick reference of the exercise
+ 'calclines' : 1, # no. of lines for calc to be input.
+ 'MAX' : 50, # maximum of calcs generated;
+ # TODO: Generate fills up by varying input.
+ 'MIN' : 10, # minimum of calcs generated 090416WN:UNUSED
+ '*' : False, # eg. 7 . 2 =_
+ '*commute' : False, # commute the operands 2 . 7 = _
+ ':' : True, # 14 : 2 = _
+ 'in' : False, # 2 in 14 = _
+ 'remainder' : False, # : | in ... with remainder
+ 'vadd' : 0, # 0 or 10, for 1.11 ... 1.19
+ 'vmult' : 1, # 1 or 10, for 1.10 ... 1.90
+ 'factors' : [2,4], # Liste mit ausgewählten zahlen zur berechnung
+ 'shuffle_all' : False, # shuffle all calcs
+ 'shuffle_inner': False, # shuffle only 1st (inner) iteration
+ 'cut-max' : True # cut set of all calcs down to MAX
+ }, [])
- #constructor of collections root
- self._root = Collection("root = invisible node",
- "aber benötigt zum richtigen speichern/lesen",
- None, [_coll0])
+ self._root = \
+Collection("root = invisible node","required by tree structure", None,
+ [Collection("Praxis Volksschule", #_c1
+ "Rechenuebungen fuer die 1. und 2.Klasse, festgelegt am 16.Dez.09 mit Nina Jaklitsch und Arndt Stoeckl .",
+ None,
+ [Collection("Uebungen . und 'in' ", #_c1c1
+ " ", None,
+ [Collection("Einzelne Reihen . und 'in'", #_c1c1c1
+ " ", None,
+ [_c1c1c1t2, _c1c1c1t3, _c1c1c1t4, _c1c1c1t5,
+ _c1c1c1t6, _c1c1c1t7, _c1c1c1t8, _c1c1c1t9
+ ]),
+ Collection("Mehrere Reihen .",
+ "Wir ueben zusammengehoerende Reihen.", None,
+ [
+ ]),
+ Collection("Alle Reihen gemischt",
+ " ", None,
+ [
+ ])
+ ]),
+ Collection("Uebungen :", #_c1c2
+ " ", None,
+ [
+ ]),
+ Collection("Uebungen + und - ", #_c1c3
+ " ", None,
+ [
+ ])
+ ]),
+ Collection("Schoenberger", #_c2
+ "Most efficient introduction to the four basic arithmetic \
+ operations as taught by Igo Schoenberger in the last century \
+ in Upper Austria.",
+ None,
+ [
+ ]),
+ Collection("Templates", #_c3
+ "These are the (classes of) exercises all others are derived \
+ from. Thus, please, do not deletem them. \
+ For testing exercises disabling of @ is recommended.", None,
+ [_c3t1, _c3t2, _c3t3])
+ ])
# comment to save changes (order of the items) till the next start