Sunday, October 16, 2016

Day 18

Secondary Resources: JavaScript on Khan Academy


I did a whole bunch of JavaScript projects today. The first one is a ball animation that uses a Boolean expression to set parameters for the range of motion and direction of the ball. The syntax of the code uses an 'if' expression to change the direction of the ball once it reaches the edge of the canvas.

Challenge: Bouncy BallMade using: Khan Academy Computer Science

The second project also uses an if statement. If the mouse is pressed on the canvas, it paints. Give it a try!

Challenge: Your First Painting AppMade using: Khan Academy Computer Science

The third project uses three different if statements that tell rectangles to be either drawn or not drawn based on the number I give the program so that it draws a rectangle text that describes the number I give it.

Challenge: Number AnalyzerMade using: Khan Academy Computer Science

In the fourth project I used an if statement to change the color of a button, but only when the mouse is pressed and the cursor is within the borders of the button.

Challenge: Your First ButtonMade using: Khan Academy Computer Science

In the fifth project, I used a similar expression but further limited the paramters to make the button smaller, which just required a bit of math.

Challenge: Smarter ButtonMade using: Khan Academy Computer Science

The sixth project is similar to the fifth, this time displaying text in the button to make a flash card. Click on the button, try it out!

Challenge: Flashy Flash CardMade using: Khan Academy Computer Science

Math Review

Today's math review is another question about if you understand what negative numbers are. Pretty easy. I'm up to 89% on 7th grade math.

Substitution with negative numbers: Practice substituting positive and negative values for variables.

No comments:

Post a Comment