Description: This program randomly generates maths questions for you to answer. It keeps a basic log of your scores and allows you to change the minimum and maximum values for the numbers.
Currently, these questions are available: - Addition; - Subtraction; - Multiplication; - Division; - Linear equations; - Simultaneous equations.
Explanations are also provided on how to solve individual linear equations.
Since this is my first ever C++ program, there are likely to be bugs or bad sections of code that I haven't sorted out yet. Please don't expect perfection!
The source archive is not in the standard format - there's no configure script, for example. You can try running the pre-built executable by typing ./LET or you can type 'make' to compile it using the given Makefile. If you can tell me how to create a configure script for this Qt application, I'd be grateful.
Before development can continue, I need to sort out a very frustratingly perplexing issue in the new feature I'm trying to implement - a maths test with multiple types of question in it.
If a Qt/C++ developer would like to help with this problem (it may be something very simple) then please download the development code and take a look. The problem should be found by doing something like this:
Run the program and press 'create test'. Add at least two of the question types from the list on the left to the list on the right. Click on each one in turn on the list on the right and enter a number out of 100 in the spinbox marked 'probability'. Then press 'Go' and answer a few questions. In a terminal, the output should show your score every time you press 'verify', and you should notice that the scores increase as they should. Press 'retire' and then press 'statistics'. A message box will probably be displayed saying that there are no statistics to view. If, from the main menu, you go to 'arithmetic', for example, and answer a few questions there, you will notice that the 'statistics' area displays scores correctly but will always ignore those from 'Create Test'.
running the linear equations tester
didn't add up.
1079983903x + 369055330 = 62847314
x = -0.283530167
not 254488336 as your program calculates.
This is before clicking options and selecting a difficulty level.
as the other person commented, probably initialisation problem. You could initialise all variables using the "elementary" difficulty level on startup, that would probably work.
In the package there should not be any object files. The INSTALL file is obsolete as you include a binary (so just write in it: tun .LET). The numbers were so big for me that it was impossible to calculate anything (like 1.36076e+9) so you have a major bug here. You should include a way to choose the range for the numbers to accomodate different ages. When you click on Next, the window itself should not be redrawn, only the label content must be repainted. 'Retire' is not a command I saw anywhere. I had trouble to understand Retire and I first thought you mispelled Retry. 'Close' is what you want here as it closes the current window. That's all for the moment!
Thank you for the comments.
I'll take out the object files, amend the INSTALL file, change 'Retire' to 'Close' and change the redrawing process when next is clicked, for the next update of the program.
Stupidly large numbers usually occur when variables haven't been initialised. I have checked through my code and I can't find any place where a variable is uninitialised, so until I can work it out, the best way to fix this is to make sure you go to the 'Options' menu first and press 'OK'.
The Options area also already gives you the choice of changing the range of numbers.
Frustratingly, the features of this program that I wish to implement currently don't work and I can't for the life of me figure out what's going on. All the code seems to be fine. It'll take me a few months before you see these things fixed, I suspect.
You should make it a kde program and put the code in cvs kdenonbeta. Then you'll get help to fix it.
Having a Menubar and a Statusbar would be nice.
I did not think to go to the Options dialog, it did not seem intuitive for me to do so at first run (and it is not). Having a quick look at the code shows me that in letForm::init() minx = 1081758080. The default value is that big!
I don't know where you define this minx. If you used KDE and kdelibs, this would be all easy to set with KConfigXT and thus very easy to debug.
In the options the maximum should be at least minimum+1
I think the 'development version' now fixes the large numbers and the options screen.
Does the program have to be a KDE program before it can be submitted to CVS? And don't I have to have contributed to KDE or KOffice before I can submit to the CVS?
I made the program entirely in Qt Designer, you see, and my installation of KDevelop 3.1 is completely non-functional (i.e. broken).
Thank you - a good idea. It would probably take me a long time to implement, though...
I'm currently working on a feature where you can have a 'hybrid' test of arithmetic and equation questions where you can select the probability of each type appearing.
Ratings & Comments
9 Comments
running the linear equations tester didn't add up. 1079983903x + 369055330 = 62847314 x = -0.283530167 not 254488336 as your program calculates. This is before clicking options and selecting a difficulty level. as the other person commented, probably initialisation problem. You could initialise all variables using the "elementary" difficulty level on startup, that would probably work.
In the package there should not be any object files. The INSTALL file is obsolete as you include a binary (so just write in it: tun .LET). The numbers were so big for me that it was impossible to calculate anything (like 1.36076e+9) so you have a major bug here. You should include a way to choose the range for the numbers to accomodate different ages. When you click on Next, the window itself should not be redrawn, only the label content must be repainted. 'Retire' is not a command I saw anywhere. I had trouble to understand Retire and I first thought you mispelled Retry. 'Close' is what you want here as it closes the current window. That's all for the moment!
Thank you for the comments. I'll take out the object files, amend the INSTALL file, change 'Retire' to 'Close' and change the redrawing process when next is clicked, for the next update of the program. Stupidly large numbers usually occur when variables haven't been initialised. I have checked through my code and I can't find any place where a variable is uninitialised, so until I can work it out, the best way to fix this is to make sure you go to the 'Options' menu first and press 'OK'. The Options area also already gives you the choice of changing the range of numbers. Frustratingly, the features of this program that I wish to implement currently don't work and I can't for the life of me figure out what's going on. All the code seems to be fine. It'll take me a few months before you see these things fixed, I suspect.
You should make it a kde program and put the code in cvs kdenonbeta. Then you'll get help to fix it. Having a Menubar and a Statusbar would be nice. I did not think to go to the Options dialog, it did not seem intuitive for me to do so at first run (and it is not). Having a quick look at the code shows me that in letForm::init() minx = 1081758080. The default value is that big! I don't know where you define this minx. If you used KDE and kdelibs, this would be all easy to set with KConfigXT and thus very easy to debug. In the options the maximum should be at least minimum+1
I think the 'development version' now fixes the large numbers and the options screen. Does the program have to be a KDE program before it can be submitted to CVS? And don't I have to have contributed to KDE or KOffice before I can submit to the CVS? I made the program entirely in Qt Designer, you see, and my installation of KDevelop 3.1 is completely non-functional (i.e. broken).
a = b + c (c) You want to (how to say thgis? =/) be "alone": c = a - b
Thank you - a good idea. It would probably take me a long time to implement, though... I'm currently working on a feature where you can have a 'hybrid' test of arithmetic and equation questions where you can select the probability of each type appearing.
Thank you very much. Any ideas for the mathematical quizzes you'd like to see included next?
Thanks for writing this program, I've been waiting for something like this for a while! (Even tried writing my own (yours is way better!))