Wednesday, September 30, 2015

Getting to Know the Snap! Interface

Getting to Know the Snap! Interface

Instructions for opening files are in yellow at the bottom of Snap! Accounts and Files.
  1. Open the "U1L1-Interface" project file that you created on the previous page.
  2. Find pen down, and click it so you can draw.
The pen down command tells the sprite (located at the tip of the arrow, sprite) to set its penpoint down to draw.
You can click any script (or block) to run it.
  1. While a script is running, its border is highlighted. Some scripts run so quickly that you may not notice the brief border flash. This script takes longer to run, so it's easier to notice the highlighted border. Script Running
    Before building this script, predict what it will do. Talk with Your Partner Then try it out.
    You just made a script!

  2. Motion palette categories: Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables
  3. Experiment! Look through the tabs in the color-coded palette menu (shown right) to find each of the blocks below. Click each block at least once, and figure out what all they do. Try changing their inputs (number, text, color, etc.) also.
    go to x 0 y 0 point in direction 90 set pen color to magenta set pen size to 1 say Hello! for 2 secs think Hmm... for 2 secs play note 60 for 0.5 beats sqrt of 10 pick random 1 to 10
  4. Blocks do different kinds of things. Some blocks create changes on the stage. Other blocks report information right where they are: Sqrt of 10 reporting 3.162... 7 < 3 reporting false x position reporting -79 pick random 1 to 10 reporting 2
    In general, you need to press pen down before you can draw. Here, you already pressed it above.
  5. Create this two-block script in the scripting area. Click on it a several times to see what it does.
    move 10 steps, turn right 15 degrees
  6. You may want to clear the stage periodically by finding and clicking the clear block.
  7. Modify the numbers in the two-block script above and discuss how each change affects the sprite's behavior. Try changing the numbers so that the sprite follows a square path if your script is clicked enough times. Talk with Your Partner

No comments:

Post a Comment