Home About Me Scratch Web Development Google 20 Python Assignments Java Assignments

My Scratch Stuff

Assignments

Unit 2 - Pair Programming 1

This project was done with our partner. We were asked to have two sprites dancing along with some background music. An easy project to ease us into the loops.

Click here for the project link.

Name Animation

This project was an example of forever loops and creating our own sprites. We were tasked with spelling our names and then having it has one big text box on the end.

Click here for the project link.

Polygons Revisited

This project was similar to what we made in the first Lab. This time we were asked to use loops instead of long lines of code in order to make a hexagon.

Click here for the project link.

Embedded Loop

This project was based on loops being inside of other loops. So for example when you press "Space" down below, for every time it moves 1 step, it will move 10 steps, until it reaches the X Position of 100.

Click here for the project link.

Repeat Until...

This project was based on the "Touching _" code line. So I set the bananas code to repeat 20 times, and when it hit the edge of the screen or "Touching Edge", it would hide itself and then broadcast to the dancing boy to start dancing.

Click here for the project link.

Loops & Conditionals

This project was based around loops and the mouse cursor. I tested 3 different scenarios. One when the green flag is clicked, it would say "There's a mouse in my house!" if your cursor was over the cat, it didn't work. The second scenario was when the space bar was pressed, it would repeat the "If Mouse Over the Cat" it would say "There's a mouse in my house!", this only worked for a short period of time. Lastly, when the A key was pressed, it would repeat the code forever so no matter how long after the key was pressed and you moused over the cat, it would say "There's a mouse in my house!"

Click here for the project link.

Questions

  1. What are the types of loops contained in Scratch? What are the differences?
  2. If you are given a situation where you want an action to repeat, but you don’t know how long it should repeat for, which loop is the best structure to use? Why?
  3. Does the following loop structure work? Does it make sense? Why or why not?
  4. How can sprites “know” when to begin an action? Is there more than one way?
  5. Are the following code snippets equivalent? Why or why not?