Scratch Lab 7
Name: Chris Theo
Period: 7
Assignment: Lab #7
Lab Overview
In this lab we focused on more completing tasks using the Block feature in Scratch. The Block feature allows you to create your own code snips then define them by what you would like them to do. For more info please go
HERE.
My Solution
My solution for the Feet to Miles, or Inches problem consists of a frog who can change feet to miles if the amount of feet entered is more than one mile. If the amount entered is less then a mile the frog will tell you how far the entered amount is in inches.
My Project Link
My Solution
My solution for the Distance Formula Revisited problem was to go back to my old Distance Formula code, copy it, then paste that code into the revisited version. I then created 2 blocks, one that asks for the values you would like to enter, and another that inputs those values then spits out an answer.
My Project Link
Questions
- What are two advantages to using blocks for code repetition?
- Two advantages to using blocks is that 1. Your code is more organised and you are able to split up the code to verify everything works and so that you can debug easily. 2. You can use the same code over and over without having to rewrite anything.
- What are parameters?
- Parameters are values that can be used in code.
- Give an example of a situation where no parameters are needed.
- You don't need parameters when you want to hide a sprite, you dont need to enter any values.
- Explain what you think the following program does? How do blocks make this easier to understand? Explain what you would expect within each block.
- The following program most likely takes someones name that they enter, then organises it based on a charactoristic in the text. The blocks make it easier to understand as they are short and have a description of what is defined within that block. I would expect the get name block to have an ask code, the insert into list block would have code that lists the text randomly, the reorder list block would contain code to organise that text, and the continue block would have code that proceeds you to the next question.
Click HEREto return to homepage