Scratch Lab 4

Name: Chris Theo

Period: 7

Assignment: Lab #4

Lab Overview

This lab is designed for us to learn how to use controls, operations, data in Scratch. We need to learn this because in traditional programming these catagories translate to variables that make things such as games and animated websites possible. HERE.

My Solution

My solution the the first problem (to create an animation that is controllable with buttons) was to make a unicorn spin in circles. This unicorn spins faster or slower depending on how many times the speed up or slow down button is pushed. This problem was easy and fun in my opinion. I liked how we learned how to create buttons as they are a big part in any game.

My Project Link

My Solution

The problem for this Scratch Project was to create a conversation between two Sprites. My solution to this problem was to have two fruit bowls walk talk about their interests. This lab was challenging to first understand but after making one sprite respond to another it was easy to repeat.

My Project Link

My Solution

In this project I created a magical lamp. This lamp is able to do math and can find the center of two ordered pairs of points. This was definitely the hardest project I have done out of all of the projects. The variables were hard to understand but I think I learned a lot from having to make this program.

My Project Link

Questions

  1. Are variables in computer programming the same as variables in math class? Why or why not?
    • Yes they are in some ways the same as variables in math. Variables represent something that can change or be any value, they are different from those in math because they are controlling something visually.
  2. When creating a variable, what are the two types of scope a variable can have? That is, what can it affect. (Think about your options as you make a variable)
    • The two types of scopes are Global and Local. A global scope is a variable accepted over a global medium, where as a local scope is only accepted on a specific medium.
  3. How many values can a variable store at one time?
    • A variable can only store one value at a time.
  4. What will the following code snippet do? Explain why it doesn’t work as intended.
    • This will do nothing. It won't do anything because the variables are dependant on one another with no outside interferiences making them useless.
  5. Given the following code snippet, explain what is happening.
    • Value two is being set to temp, temp is being set to value one, and value one is being set to value two. Meaning this code does nothing because all the values are equal to eachother.

Click HEREto return to homepage