Tuesday, December 16, 2014

Hour of Code

During class we were assigned to lear how to use codes to control what happened on our computer screens We were given the option to use either a "Frozen" themed template or and "Angry Birds" template. I chose Frozen, and got to make Elsa and Ana move the way I wanted to with the help of the Hour of Code steps. I really enjoyed this because I got to see how some of the electronic things I use everyday were programed to do their jobs. Something that was challenging was trying to figure out how many degrees the figure was supposed to turn to make the desired shape. I learned how to make simple commands on a computer and make something interact using those same commands. Something that was surprising was the fact that I eventually made around 36 different codes when playing a simple game! One code I used to make a cool shape that looks like a snowflake is listed below, followed by the finished product!

for (var count2 = 0; count2 < 10; count2++) {
  for (var count = 0; count < 4; count++) {
    moveForward(100);
    turnRight(90);
  }
  turnRight(36);
}
This assignment was very fun and a great learning opportunity!

No comments:

Post a Comment