Posts

Showing posts with the label variables

Create a Money Counter

Image
Money is conductive... The purpose of this post is to show how to create a money counter using Scratch and a Makey Makey . What does the code look like? Code for creating a money counter. What are the orange blocks? The Orange blocks are variables. When you have a value that you want the computer to store you create a variable. In this program there is one variable for each coin, one for calculating the total "checksum" and one to prompt the user for the answer. What does the stage look like? Students need a way to track how many times they have counted a coin. To do this you can display the variables on the Scratch stage. This gives a visual tally of each coin. The checksum total is hidden by default but can be displayed for 1 second to check the total by pressing the "a" key. When a user presses the "f" key the user is prompted to add the visible coin totals and enter the total it in 0.00 format. Scratchie the cat will announce if th...

Introducing variables with Scratch and Makey Makey

Image
It is possible to use the Makey Makey for than a keyboard that makes bananas an inedible mush. This project will be creating switches to collect data for a survey. This could be modified to encourage students to collect data using an alternate method to forms. Student can modify the project to collect data to test understanding or collect information for a survey. It could be used by teachers to test student knowledge when they leave a classroom. This is designed as a simple introduction to variables. There are other ways to make this more efficient code but the purpose of this lesson is to introduce the concept of variables. Target Group Year 4-6. Students have simple coding experience with block coding and ready to progress to the next step. Concepts covered: Introductory coding Variables Digital Systems Variables What is variable?  A variable is used i n a computer program, this is a named memory location where values are stored.  A variable m...