
Coding Challenges for Micro:bit and MakeCode
Explore coding challenges for micro:bit and MakeCode including dice emulator, timing game, rock-paper-scissors, and more. Enhance your coding skills and have fun with various interactive tasks.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Dice Emulator 1. Create the following code in MakeCode. 2. Fix the mistake so it shows the normal numbers from a die. 3. Change the input to on shake rather than button A. 4. Make the microbit play the short tune shown opposite when the the number is shown. Extension: in Dungeons & Dragons you can also use 8, 10, 12 and 20 sided dice. Could you write code to include all of these as options in your microbit?
7 Second Game 1. Create the following code in MakeCode. What does it do? 2. Why is absolute of used? 3. Alter the code to show a symbol when A is pressed. 4. Display the score on the LEDs after B is pressed. 5. Add a loop so that the score is shown 4 times. 6. Change the code so the user knows if they pressed too early/late.
Rock, Paper, Scissors 1. What does this code do? 2. Do you think this is a good strategy for this game? 3. Use the pick random command in the Math functions to make the choice of outcome a random one.