110 likes | 259 Views
Project 0. Choose one ( or more) of the following projects…. Project 0 – Options. Option 1: Draw a Picture in Scratch Option 2: Electric Keyboard Option 3: Countdown with Sprites. Option 1: Draw a Picture in Scratch. Create something (anything!) beautiful with the drawing tools in Scratch.
E N D
Project 0 Choose one (or more) of the following projects…
Project 0 – Options • Option 1: Draw a Picture in Scratch • Option 2: Electric Keyboard • Option 3: Countdown with Sprites
Option 1: Draw a Picture in Scratch • Create something (anything!) beautiful with the drawing tools in Scratch.
Option 1: Draw a Picture in Scratch • Play around with pen color and pen size. If you want to create more complex images, you probably want to use broadcasts to delegate the drawing of different parts of the image. • Tip: Your images will draw more quickly if you hide the character. • For example, for the flower image:
Option 2: Electric Keyboard • Try to make an electric keyboard! The code on the right shows a start:
Option 2: Electric Keyboard • Hint: You might want to print or draw a piano keyboard or a computer keyboard to keep track of how you have mapped keys to notes. Here are some images that you can work with.
Option 2: Electric Keyboard Challenge Try to set up sprites for each key on the keyboard. When the letter that is mapped to the key is pressed you can darken the key by changing its costume to simulate it being pressed.Add additional functionality, perhaps by adding scripts for other keys on the computer keyboard, so that your electric keyboard can change: • Volume, • Instrument, and/or • Tempo.
Option 3: Countdown with Sprites • Often, we want to display text or numbers on the screen without using the say block. Take a look at the program that displays one number based upon a variable named digit. You can download the program from my Pickup folder, called DigitalDisplay.sb. • You should modify this program to work for five digits! (Initially, however, you may want to start by modifying it just to work with two digits.)
Option 3: Countdown with Sprites • There is a MyDigit sprite with ten different costumes, one for each digit. Costume 1 corresponds to the digit 1, costume 2 corresponds to the digit 2 and so on. Costume 10 corresponds to the digit 0. Each costume has a name (for example, one, as shown circled in yellow) and a number (for example, 1, as shown circled in red).
Option 3: Countdown with Sprites • When we use the switch to costume block, we can specify either the name or the costume number. In the script below, we use the costume number (1-9) to set the costume unless the digit is 0. If the digit is 0, we cannot just tell it to switch to costume 0 (because there is no costume 0), so we have to use the name of the costume (zero).
Option 3: Countdown with Sprites • ModulusThe mod block is essential to completing the program efficiently. The modulus operator is used to return the remainder of a division operation. It might remind us how we answered division problems before we learned about decimals(e.g. 10 / 3 = 3 remainder 1). 10 mod 3 = 1. As you complete this assignment, consider the place value of each digit you need to change. If I am counting down from 25. I can grab the "5" off of 25 by doing 25 mod 10 since 25 mod 10 = 5. And I can grab the "2" by performing the following operation: (25 – (25 mod 10)) / 10 = (25 – 5)/ 10 = (20) / 10 = 2For more explanation on the mod block, right-click on the block and select Help.