top of page

HW3: Interactive Quiz Game

For this project, I created a little Interactive Quiz Game. I developed the idea after watching an episode of Jeopardy and thought about the buzzers the contestants were using. Upon opening up the Make-Code Website, I stumbled upon a tutorial for creating a working die with the Micro-bit using Random Number Generation. I went through the tutorial and decided to use this same principle to select a random Question from my question list. When I started coding, I added variables, listed "Question 1", "Question 2" and so on, then set variables for a Right and Wrong Answer. Quickly, I became stuck. I wanted to be able to make pressing the A or B button count for a different answer for each question, so that I could make the right answer A for one question and make A the wrong answer for the next question. I dug around on the tools panel until I found the Functions tab. Curious, I looked it up and found a YouTube tutorial on creating a game of Rock-Paper-Scissors. The person in the video used a function to reorganize the Rock, Paper, and Scissor variables and place the call into the "Shake" Input. I took this principle and combined it with conditionals, so that I could create Right and Wrong Answer FUNCTIONS and under a conditional I could say, for example, that if the randomly chosen question is Question 1, a press of the A Button would call the Right Answer Function. Additionally, the Right Answer Function would display a Circle Animation and activate a Green LED, while the Wrong Answer would display an X Animation and activate a Red LED.


Quiz Game Code Link: https://makecode.microbit.org/_RcuH325XATU1


Comments


© 2018 by Raven Lozada. Proudly created with Wix.com.

  • facebook-square
  • Flickr Black Square
  • Twitter Square
  • Pinterest Black Square
bottom of page