aaronharnly/girlsrockcomputerscience

Instructions for Lesson 8

1 parent 747becf commit 86d9f35fda0aed1880e558ca1a9d2e62ed3cb72d aharnly-amplify committed Sep 24, 2013
Showing with 72 additions and 59 deletions.
1. +72 −59 index.html
 @@ -1,59 +1,72 @@ - - - Computer Science - - - -
-

Do Now

-

Do Now

-
-
-

Snap Setup

-

Remember, your Snap! username is: ywls-{firstname}{lastinitial}. For example, Alicia Smith would be ywls-alicias.

-

-

Before doing anything else, try logging in and saving a project.

-

Start Snap!

-
-
-

Variables

-

Create a variable for the size of the square.

-

Have the sprite ask you for a size, then set the variable with the answer.

-

Use the variable to draw the square.

-

Blocks you will want to use:

-
-
-

Variables with Operations

-

Have the sprite ask you for a size, then draw a square *twice* that size.

-

Blocks you will want to use:

-
-
-
-

Loops

-

Use a loop to draw a square.

-

Blocks you will want to use:

-
-
- - + + + Computer Science + + + +
+

Do Now

+

Do Now

+
+
+

Snap Setup

+

Remember, your Snap! username is: ywls-{firstname}{lastinitial}. For example, Alicia Smith would be ywls-alicias.

+

+

+

Start Snap!

+
+
+

Loops: N-Sided Polygon

+

Your challenge: Create a program that

+
+
• +
• Sets a variable for the number of sides
• +
• Sets another variable with the angle to turn at each side
• +
• Uses a loop to draw each side of the polygon, and turn to prepare to draw the next side
• +
• Make sure to initialize your program with "clear" and "go to 0, 0" blocks so you + have a clean stage each time.
• +
+

Here is an example of running the N-Sided Polygon program and choosing 4 sides:

+

+

+ +

Here I run it again, but choose 8 sides:

+

+

+ +

This is my program (made blurry so you don't just copy it!):

+

+
+
+

Conditionals

+

+
+ + + + +