Scratch Lab 8 Write Up
Name: Olivia Moore and Alex Keppel
Period: 7
Assignment: Scratch Lab #8
The full lab description is found HERE.
Overview/Solution Pt 1a, 1b
Our solution with the finches involved a lot of movement and dealing with spazzing robots. Our finch was a worshipper of Satan and began moving when no buttons were pressed and when it was disconnected. It was very difficult to deal with, but we came through. The first part of the use with the finches required moving the finch forwards, backwards, turning right, and turning left. With the "move" command, we used blocks to organize the code and move the finch with set values for the wheel speeds. Moving forward means a positive value and backwards means a negative value. In order to turn the robot, we increased and decreased values of each wheel to turn it slightly or sharply. The sensors on the devil finch seemed to be broken as it would not move away from the obstacle as we coded it to and no one could figure out how to fix finch #13. However, the orientation of the finch was recognized and spoke when told to speak. The finches were fun to work with for the most part, and it was interesting being able to code a robot with something as somewhat simple as Scratch.
Overview/Solution Part 2
Our solution is to use blocks that carry out an operation like a calculator. We did this by using different blocks for each operation, including add, subtract, multiply, divide, and power. To carry out each operation, we used a different block "calculate" that determined which operation the user chose and what to do for each operation in if statements. Separate blocks with different parameters for each operation defined what to do. For example, if the user chose add, the code would "calculate" "add" and say the numbers given by the user stored in variables added together. It would repeat this for each operation except subtracting, multiplying, dividing, or multiplying the same number by itself. Blocks and parameters make codes be more customized and better organized to get a sprite or program to do what you want.