Saturday, 17 May 2014

Math quiz - Python

Hello readers, I am going to show you my self-created python program.
This program is basically a mathematics quiz which helps you to test your calculation skills.
It generates random questions of product, addition and subtraction.
It asks the no. of questions you want to answer.
It's algorithm is as follows:
1. It lets the user input the no. of questions he/she wants to be asked.
2. It then generates random questions by using the random module's randint function.
3. It checks the answer and gives the correct one if the user's answer is wrong.
Thats all and rest you will discover from the program itself.
Download this program:
The program gives the following output :

New version! 
Works with python3 (tested with version 3.3.2)
Download : Datafilehost

Don't Forget to hit +1


  1. Do you have a solution for Task 3?

  2. What is task 3?
    Let me know and I could possible solve it.

  3. I tried to run the program but I keep getting a syntax error on line x=float(cans)
    Can you help?

  4. I tested the program again but didn't get any error.

    Please give the complete output you get while running the program in your PC.
    Maybe you are using the inappropriate version of Python.
    Python 2.7 is the appropriate version. Make sure you are not using 3.x version.

    Comment again if you get the error.

  5. This comment has been removed by the author.

  6. This is task 3:
    The teacher wants to use the results from students taking these quizzes to log their performance. The
    system should store the last three scores for each student. The teacher would like to be able to output
    the results of the quiz for a particular class, sorted:
    • in alphabetical order with each student’s highest score for the tests
    • by the highest score, highest to lowest
    • by the average score, highest to lowest.

    1. I will surely solve task 3. But due to my exams expect the solution by 28th feb. Stay tuned as I may post the solution any day.

  7. Not often do I encounter a weblog that is both educated and entertaining, and let me tell you, you may have hit the nail on the head. Your concept is excellent; the issue is something that not sufficient individuals are speaking intelligently about. I am very happy that I stumbled across this in my quest for something relating to this.