We loved Quiz in classroom to get friends or students to be engaged. There is a lot of interaction whenever we have Quiz. Today article, we discussed to make a simple Maths Multiplication Quiz APP.

Math Multiplication Quiz

Maths logo
Maths logo
  • We do a plan on the APP into 5 steps:
    • When user open the APP, a welcome message and start button is to be shown.
    • When user clicks the button, open the practice screen.
    • When the clock timer fires, display random multiplication problem and an empty text box for the user to input the answer and add 1 to the total number of questions.
    • When user clicks the end button, stop Quiz and change user display to show only the final percentage scores.

Multiplication Designer

  • We will need the following components:
    • Button x3: for user to click to start and, Quiz and check answer.
    • Clock x1, to set to 5 seconds interval.
    • Label x3, display math problems, answer result, and scores.
    • HorizontalArrangement x1, to hol the answer textbox, check answer button answer label.
    • Notifier x1, display an alert to the user.
    • Screen x2, welcome screen and Quiz screen.
    • TextToSpeech x2, say welcome message an answer right or wrong.
    • VerticalArrangement x1, hold all practice screen and components.
    • Varaibles x7, store problems, answers and scores.
  • Add screen 1, with button and TextToSpeech. Set the background image.
  • In Screen2, add the rest of the components. Set the background image for Screen2.
screen1 design
screen1 design
screen2 design
screen2 design

Multiplication Block

Screen1 Block Code

  • When Screen1, call TextToSpeech to welcome player to the game.
  • When Quiz button is pressed, change to Screen2.
screen1 code
screen1 code

Screen2 Block Code

  • When Clock1 timer trigger,
    • Clear the answer textbox and enable it.
    • Set new random number (1 to 12) for variable a and b.
    • Show the multiplication quiz on problem text.
    • Increase the problem count and clear the result text
  • When CheckAnswer button is pressed,
    • Check if the answer textbox is not empty.
    • Disable the CheckAnswer button.
    • Set answer variable to the answer textbox.
    • Calculate the actual answer using variable c with a x b.
    • If answer= c, TextToSpeech will say Correct and the Answer label show Correct.
    • If answer not equal c, TextToSpeech will say Wrong and the Answer label show Wrong.
    • Call notifier if answer textbox is empty and notify No answer or too late answer.
  • When End button is clicked
    • Make visible to false for HorizontalArrangement (which has button, textbox and answer label) and Quiz label.
    • Set clock interval and end button to false .
    • Calculate the total score in percentage by get score/problems count *100.
    • Show in the score label the total score.
screen2 code

Finally, you can build more maths quiz using the same idea for friends or students to play,

Take care and stay safe.


This free site is ad-supported. Learn more