Señora and Ms. C helped.
Page 3: Customizing and Debugging
Unit 1, Lab 2, Page 3
On this page, you will edit the word lists used by the sprites and debug any problems.
- Open your U1L2-Gossip project. Edit these three reporter blocks to change the phrases that the program uses. (See the instructions in the box below.) Be creative and funny but thoughtful.
How to Edit a Block
- Find the block in the scripting area or the colored palettes on the left.
- Control-click (or right-click) on the block and choose “edit…”
- Make changes to the block’s internal code. (Instructions are already inside these blocks.)
- Click OK when you’re satisfied. (Or click “Cancel” if you don’t want to make changes.)
Brian, you need to redo this video with the plus signs on and with the space before the 2 in who 2
(start from the starter file, please). –MF, 6/15/20
Click for a video of these steps of how to edit a block.
Why do these blocks use ? Why not just use ?
The report
and say
blocks mean very different things. Report
tells something to the computer, and that value can be used as input to another block, such as the join
block inside gossip
. Say
just shows a value to the user in a speech bubble.
: Lists, Strings, and Concatenation
It doesn’t mean that the items have to appear in alphabetical or numeric order. It just means that is a different list from .
- A list is an ordered sequence of items. You’ve seen this example:
- The items of this list are strings. A string is a sequence of characters (letters, digits, punctuation, etc.). A substring is just a piece of some existing string. For example, “Hanna,” “anna”, and “nnah” are each substrings of the string “Hannah.” (The empty string as well as the original string are both also substrings.)
- To concatenate strings means to make a bigger string by connecting two or more smaller strings. In Snap!, the block lets you concatenate strings.
The process of testing, finding problems, and fixing them is called debugging.
- Make sure your program works. Test each block as well as the program as a whole. If something doesn’t work, don’t go on without fixing it.
-
Which two of the following sentences could be reported by
gossip
?
For reference:
It’s true that there are two people (two “who”s) and one action (one “does what”), but they aren’t in the right order. Also, the word “and” isn’t anywhere in the program.
Señora ran away from my cat.
Correct! This follows the pattern: “who,” “does what,” “who.”
Hannah listened to Hannah.
Correct! This follows the pattern: “who,” “does what,” “who.”
Jake helped.
This sentence is missing the second “who.”
- Change the costumes to anything you like.
Adding a Costume
- In the sprite corral, select the sprite you want to give costumes to.
- Choose “Costumes…” from the File () menu.
- Choose a costume.
- Click “Import.”
- Click “Cancel” to close the dialog box.
You can use a photograph or picture from the Internet by dragging the image onto the Snap! window.
- Fix any issues with your costumes.
Adjusting a Costume
- You can change the size of your sprite using .
- You can change the position of your sprite using .
- You can change the direction your sprite is facing:
Blue “If There Is Time” boxes have optional activities that are not required for this course. If you finish everything else on the page early, try these instead of jumping ahead to the next page. If you have a smartphone, you’ll definitely want to click this one.
-
Change the background on the Stage.
Adding a Stage Background
Changing a stage background is almost like changing a costume.
- In the sprite corral, select the stage.
- Choose “Backgrounds…” from the File () menu.
- Choose a background.
- Click “Import.”
- Click “Cancel” to close the dialog box.