A Digital Dice
Rubab, a 9-year-old coder, created a digital dice program using the micro:bit that generates random numbers between 1 and 6 whenever the device is shaken. Each number corresponds to a unique image displayed on the LED matrix, such as a heart for 1, a duck for 2, a silly face for 3, and others for different numbers. The program uses a variable to store the random number and conditional statements to display the respective images. Rubab demonstrated how the dice works interactively and explained the concepts of randomness, variables, and input handling, showcasing her growing programming skills.
Attend our in-person Robotics & Math