diff options
author | Walther Neuper <neuper@neuper.(none)> | 2009-11-24 16:15:23 (GMT) |
---|---|---|
committer | Walther Neuper <neuper@neuper.(none)> | 2009-11-24 16:15:23 (GMT) |
commit | cec1829a36b8c56940eee701a09ab3047aacfafe (patch) | |
tree | 9edda1e578c447c51cf0b8af11387f7c15bcdca9 | |
parent | b2b783a40cb5881765edba841cc3990203157ff8 (diff) |
removed changes for exaddsimp/test_generate_calcs
-rwxr-xr-x | ReckonPrimer.activity/activity/activity.info | 2 | ||||
-rwxr-xr-x | ReckonPrimer.activity/exaddsimp.py | 10 | ||||
-rwxr-xr-x | ReckonPrimer.activity/expassten.py | 15 | ||||
-rwxr-xr-x | ReckonPrimer.activity/extimesdiv.py | 11 |
4 files changed, 9 insertions, 29 deletions
diff --git a/ReckonPrimer.activity/activity/activity.info b/ReckonPrimer.activity/activity/activity.info index 710cce1..36b696c 100755 --- a/ReckonPrimer.activity/activity/activity.info +++ b/ReckonPrimer.activity/activity/activity.info @@ -3,7 +3,7 @@ name = ReckonPrimer bundle_id = org.laptop.ReckonPrimerActivity class = ReckonPrimerActivity.ReckonPrimerActivity icon = activity-reckonprimer -activity_version = 5 +activity_version = 6 host_version = 1 show_launcher = yes diff --git a/ReckonPrimer.activity/exaddsimp.py b/ReckonPrimer.activity/exaddsimp.py index 629103f..28e8430 100755 --- a/ReckonPrimer.activity/exaddsimp.py +++ b/ReckonPrimer.activity/exaddsimp.py @@ -41,7 +41,8 @@ class ExAddSimp(Exercise): _dic = self._sett _calcs = [] if _dic['+']: # '+' or '-' are True - _c = self._alladd(7,7, _dic['min'], _dic['max']) + #_c = self._alladd(7,7, _dic['min'], _dic['max']) + _c = self._alladd(_dic['min'], _dic['max']) if _dic['_+_=_']: # '_+_=_' or '_=_+_' are True # choose 1 actual position for input _cc = [(c, random.choice(_dic['input='])) for c in _c] @@ -440,14 +441,15 @@ class ExAddSimp(Exercise): self._display._sett['=input'] = list(set(self._display._sett['=input']) - set([5])) ##### end of public methods ############################################ - def _alladd(self, min10, max10, min, max): + #def _alladd(self, min10, max10, min, max): + def _alladd(self, min, max): """generate all calcs for +""" _adds = [] for _i in range(min, max +1): for _j in range(0, _i +1): print("in Generate._alladd i= ",_i," j= ", _j) - _c = [to_str_99(min10), to_str_99(_j),'+',to_str_99(_i-_j),'=', - to_str_99(min10), to_str_99(_i)] + #_c = [to_str_99(min10), to_str_99(_j),'+',to_str_99(_i-_j),'=',to_str_99(min10), to_str_99(_i)] + _c = [to_str_99(_j),'+',to_str_99(_i-_j),'=',to_str_99(_i)] _c = flatten(_c) _c = strip(_c, '#') _adds.append(_c) diff --git a/ReckonPrimer.activity/expassten.py b/ReckonPrimer.activity/expassten.py index c517064..4059b2b 100755 --- a/ReckonPrimer.activity/expassten.py +++ b/ReckonPrimer.activity/expassten.py @@ -34,17 +34,8 @@ class ExPassTen(Exercise): 'shuffle_inner': False, # shuffle only 1st (inner) iteration 'cut-max' : True # cut set of all calcs down to MAX } + self._calcs = self._generate_calcs() -# def get_setting(self): -# return self._sett - -# def get_topic(self): -# return (self._sett)['topic'] - -# def update_setting(self, sett): -# self._sett = sett -# self._calcs = self._generate_calcs() - def format(self, (cs, ms, linepos)): """format the calc for display, prepare overlays for input""" #print('in ExPassTen.format: (cs, ms, linepos)=', (cs, ms, linepos)) @@ -224,10 +215,6 @@ class ExPassTen(Exercise): random.shuffle(_calcs) return _calcs -# def count(self): -# """TODO""" -# return len(self._calcs) - def define_buttons(self): """ See comment in Exercies.define_buttons. """ self.toggle_plus = gtk.ToggleButton("+")
diff --git a/ReckonPrimer.activity/extimesdiv.py b/ReckonPrimer.activity/extimesdiv.py index ec0b716..e3887eb 100755 --- a/ReckonPrimer.activity/extimesdiv.py +++ b/ReckonPrimer.activity/extimesdiv.py @@ -32,16 +32,7 @@ class ExTimesDiv(Exercise): 'shuffle_inner': True, # shuffle only 1st (inner) iteration 'cut-max' : True # cut set of all calcs down to MAX } - -# def get_setting(self): -# return self._sett -# -# def get_topic(self): -# return (self._sett)['topic'] -# -# def update_setting(self, sett): -# self._sett = sett -# self._calcs = self._generate_calcs() + self._calcs = self._generate_calcs() def format(self, (calc, linepos)): """format the calc for display, prepare overlays for input""" |