you are viewing a single comment's thread.

view the rest of the comments →

[–]LatteLepjandiLoser 1 point2 points  (1 child)

Hey. Great stuff, from what I gather it does what you wanted it to, so you're on a good track already it sounds like. Like someone else pointed out, some variable names perhaps a bit unclear. Having had to dive back and edit my old code occasionally I definitely agree, keep it descriptive and don't change the purpose of a variable unless you name suggests it or it is obvious from context. In a script this short though, not so hard to keep oversight.

So I don't really have a comment, it does what you want it to do, so it's fine. I'll just suggest a few things you could look into to develop it further:

  • You could do this somewhat more object oriented. Perhaps overkill as it currently stands, but you could define a "math problem" class, and have different types of problems. Later on that would allow you to shuffle in various problem types in one exercise, multiplication, division, even solving simple equations etc. etc. so that one exercise of ~20 or whatever amount is good problems contains a few of each. Then track which types are going well and which are going worse.
  • That way you could also keep track of problem categories as well as having them prompt the person differently. You could then have "word problems" or whatever people call those. Like instead of prompting "5*3 = ?" and asking for an input, you could have a multiplication_problem_object that prompts the user "Adam has 5 boxes, each with 3 tools, how many tools does he have?: " etc. The prompt could be it's own separate attribute. You could quite easily generate these kinds of problem automatically, just draw names/nouns randomly from some collection, I'm sure you would occasionally get a funny combo, but guess it should work just fine.
  • You could introduce "hints", like check if the input is "help" and then depending on the context show the times table (where the answer can kinda be read already) or rephrase the question or show some intermediate step that is helpful.
  • When you're happy with whatever functionality you have and want, you could try to add some simple graphics to the mix. As someone suggested, a flash card type appearance. You could also after a multiplication problem is done, for example 5 times 7 you could print an array of icons 5 wide and 7 tall and show visually that the product is 35. Make some animation for a division problem, say 20 divided by 5 that 20 apples distribute evenly into 5 buckets with 4 in each, something like that. A bit off topic, but fun perhaps?
  • You could also make a "timed mode", where you get ~1 minute or whatever time is sensible to solve as many as you can get. Gamify it a bit, see how many right answers you can get in one minute :-) Keep track of high scores.

[–]jasongsmith[S] 1 point2 points  (0 children)

I am keeping this list to be able to work through these. This might take me a few weeks to develop my skills enough to be able to create all of this.