Probably there was an insult to your brain following appendix
rupture that you had at 7 years age. The effect on brain could have been due to spread of infection to brain, decreased blood supply to the brain or a variety of other such things. Only the review of your medical records of that time can help us come to a definite conclusion. What you can do now is that you can consult a psychologist
who will assess your mental abilities. They will assess you strengths and weaknesses and then you have to go through a program of 'cognitive retraining'.
Wish you good luck.