Students Can Program Financial Literacy Game with Scratch & Makey Makey

Version 3

    three kids on laptops

     

    The types of coding and computational thinking (CT) activities that we find to be most valuable are the ones that incorporate a wide variety of concepts and skills.

     

    In this activity, students can program a financial literacy game in Scratch that may also be combined with the Makey Makey.  The program will ask the “player” to indicate the coins required to make the right change as indicated.

     

    STEP 1: PROGRAMMING THE GAME

     

    If your students are experienced programmers, then it might be interesting to challenge them to make the game themselves.

     

    Instructions for this challenge could be worded as follows:

     

    Create a small game that generates a real number between $0.00 and $4.95 (rounded to the nearest 0 or 5).

    The user will be challenged to enter the number of toonies, loonies, quarters, dimes and nickels to make the change indicated.  When the change is correct, the program will indicate that the change is correct and will loop again to generate a new amount.  If the amount goes above the change indicated, the program will indicate the change value is too high.

     

    program.JPG

     

     

    This coding challenge can be scaffolded by providing students with a skeleton of the program.  For these applications, your students will need to click on each coin sprite and ensure the Total Change variable increases by the proper coin amount.  For example, the quarter sprite code is shown below each option.

     

    Skeleton of program - students complete the code for each coin sprite - great exercise for reinforcing value amounts:

     

    quarter1.JPG

    • With Makey Makey - touch the coins attached to the Makey Makey to add more coins to the Total Change

     

    quarter.JPG

     

    Or, if your focus is on the hardware, electricity concepts and/or playing the game, you may opt to give them the completed program:

    changecode.JPG

     

    STEP 2: BUILDING THE PHYSICAL INTERFACE (if incorporating Makey Makey)

    coins connected to the makey makey wires

     

    Using:

    • A Makey Makey
    • Coins

     

    Optional:

    • Cardboard
    • Glue or tape

     

    Students will design and build the physical interface that will work with their code. Students enjoy the opportunity to be creative, so it's sometime wise to provide them with the suggested components of the physical interface, but allow them to decide how the components will be set-up based on the software (Scratch code).

     

    In this case, students will need to have five coins (toonie, loonie, quarter, dime, nickel) with the alligator clips attached to each one.  One alligator clip will need to be held by the user as it will be the one attached to “Earth” or ground on the Makey Makey.  The coins are made of metal, which is a conductor - great opportunity to discuss electricity concepts (grade 6 and 9 Ontario curriculum) - current, electron flow, insulators, conductors...

     

    Alternatively, the coins may be placed on the cardboard holding the coins in place (using glue or tape). Each coin should connect, using a wire, to different parts of the Makey Makey including the left arrow, right arrow, up arrow, down arrow and Space bar. The students will also connect a wire to the ground and they can hold this wire, or attach it to a tinfoil wristband.

     

    Students may take the time to create more professional looking interfaces that hide the alligator clips.

     

    image showing the coins connected to the interface

     

    STEP 3: CONNECTING TO THE INTERFACE AND THE PROGRAM (ALTERING THE CODE SLIGHTLY)

     

    Students can now alter their code so rather than entering in the number of each coin needed by clicking on sprites, the program will tabulate coins by using the left arrow (toonies), right arrow (loonies), up arrow (quarters), down arrow (dimes) and space bar (nickels) - as in the code sample above for the application with the Makey Makey.

     

    Students can plug in their Makey Makey to the computer and the code should work. If not, then students are presented with a wonderful opportunity to debug:

    • Is the bug in the code?
    • Is the bug in the hardware/wiring?
    • Is the bug in the interface?

     

    This is a great opportunity to investigate the problem solving strategies suggested by students. How do they determine where the bug is located? Can they perform some tests to rule out some of the possible bug locations?

     

    In this activity, teachers can emphasize any number of aspects related to the lesson, including:

    • The mathematics of making change;
    • The use of manipulatives in mathematics learning;
    • The mathematics of random numbers and rounding;
    • Financial literacy skills related to the values of money pieces;
    • Electricity concepts associated with the Makey Makey-  current flow, insulators/conductors and open and closed circuits;
    • The iterative problem solving and design process associated with building the circuits;
    • Specific programming concepts including conditional (if) statements, loops and variables.

     

    Some pedagogical components that we see as being valuable in this activity include:

    • Opportunities for differentiation as students can program the code themselves, use the skeleton program, or use the completed program;
    • If done in groups, students can assume different roles (computer engineer, electrical engineer, designer, etc.);
    • This would qualify as a "low floor - high ceiling" activity as students can extend the activity to generate a price, a payment, and the user could calculate the change necessary;
    • Students have an opportunity to be creative in how they design the "console" or input device (how they arrange the coins, etc.).

     

    Let us know if you use and/or remix this activity!  We would love to see how this activity could be improved.