Cam 1: Gwneud
Beth yw e?
Test your knowledge of times tables with this project.
Mae'r ddau fideo hyn yn dangos i chi yr hyn y byddwch yn ei greu a sut i'w godio:
Sut mae'n gweithio
- The program uses two variables called “a” and “b” to store random numbers.
- Variables store numbers or values that can change in a computer program.
- Press button A to generate a random number between 1 and 12 for the variable “a” and to show it on the LED display. Press button B to generate another random number between 1 and 12 for “b” and to show it on the LED display.
- Shake the micro:bit to find out what the product is - that's what the answer would be if the numbers were multiplied together. This part of the program works using the multiplication block from the maths menu in MakeCode.
- You can use this project in a competitive two-player game, where the two random numbers are read out and each player must shout out the correct answer first to win a point.
Beth sydd ei angen arnoch
- micro:bit (neu efelychwr MakeCode)
- pecyn batri (opsiynol)
- our set-up guide may be useful
Cam 2: Codio
Cam 3: Gwella
- Adjust the program so that it helps you to learn square numbers.
- If you are playing the two-player game, create another program on a different micro:bit to keep track of the players' scores.
- Use various inputs in this program to trigger different sound effects, which you can play when players give a correct or incorrect answer.