[kde-edu]: Simple arithmetic apps

Mahfouf Anne-Marie kde-edu@kde.org
Thu, 30 Jan 2003 19:16:09 +0000


Hi John,

>
>Is there anything out there that does tests basic mental arithmetic skills 
>(addition, subtraction, multiplication tables) for 6-8 year olds?

no, I once started a multiplication app (KTimes)but I could not find a nice 
GUI for it. I am very bad in design...

>To illustrate this, I knocked together a python script (below), but it 
>would be nice to have something like this in Qt/KDE. I guess it wouldn't 
>take even me long to write something if there's nothing already.

There's nothing and I encourage you to go ahead if you wish.
There are python bindings for KDE but I don't know more about that. I guess 
some people could guide you if needed.
You can also use KDevelop which is a very nice development environment and 
takes care of Makefile and config scripts.
And you can ask any question you want on the kde-edu-devel mailing list.
If you want, I can help you, this is the kind of app I am able to help with.

Anne-Marie
aka annma
annma@kde.org


>--
>JDL
>--
>#!/usr/bin/python
>import whrandom
>def test_int( s ):
>     if len( s ) == 0:
>         return 1
>     for char in s:
>         if char not in "0123456789":
>             return 1
>     return 0
>def get_int( x ):
>     text = raw_input( x )
>     while test_int( text ):
>         print
>         print "You must type a number."
>         text = raw_input( x )
>     return int( text )
>print; print; print
>print "*************** My Sums Test *****************"
>print; print;
>score = 0
>while score < 10:
>     if whrandom.randint( 0, 1 ):
>         a = whrandom.randint( 0, 9 )
>         b = whrandom.randint( 0, 9 )
>         r = a + b
>         c = get_int( "What is %d + %d? " % ( a, b ) )
>     else:
>         #subtraction
>         a = whrandom.randint( 0, 18 )
>         b = whrandom.randint( max( a - 9, 0 ), min( a, 9 ) )
>         r = a - b
>         c = get_int( "What is %d - %d? " % ( a, b ) )
>     if c == r:
>         score = score + 1
>         print "Correct: your score is %d" % score
>     else:
>         score = 0
>         print "The correct answer was %d. You must start again." % r
>     print
>print; print "Well done! You got ten correct answers in a row."
>print; print
>
>_______________________________________________
>kde-edu mailing list
>kde-edu@mail.kde.org
>http://mail.kde.org/mailman/listinfo/kde-edu


_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger 
http://messenger.msn.co.uk