<commit_before>---
layout: "post"
title: "Lab 1⃣.1⃣"
date: "2016-09-15 07:32"
---

# Geometric Fun Times™

In this lab, you will write your first SNAP programs to draw some simple shapes on the stage.

## 1. Drawing a square

1.1) Write a SNAP script that **draws a square** when the **number `1`** is pressed on the keyboard. Remember that each corner of a square is a 90° angle.

1.2) **Add code** so that the sprite **says the word "square"** while it is drawing. The sprite should **stop** saying "square" once it has finished drawing the square.

1.3) **Add code** so that pressing the spacebar clears the pen marks from the stage.

Comment your code explaining your work.

## 2. Adding more shapes

2.1) Now that you've drawn a square, add code to draw the shapes in the following table. Each shape should be drawn when the number next to it is pressed on the keyboard. (For example, pressing 3 on the keyboard should draw a diamond.)

<table>
  <tr>
    <td>When this key is pressed...</td>
    <td>Draw a ...</td>
  </tr>
  <tr>
    <td>`1`</td>
    <td>Square</td>
  </tr>
  <tr>
    <td>`2`</td>
    <td>Equilateral triangle</td>
  </tr>
  <tr>
    <td>`3`</td>
    <td>Diamond</td>
  </tr>
  <tr>
    <td>`4`</td>
    <td>Pentagon</td>
  </tr>
  <tr>
    <td>`5`</td>
    <td>Parallelogram ("leaning rectangle")</td>
  </tr>
  <tr>
    <td>`6` </td>
    <td>5-pointed star</td>
  </tr>
</table>


You will probably want to draw a sketch of each to figure out the angles in each shape.

2.2) **Add code** so that as each shape is being drawn, the sprite is saying the name of shape. The sprite should **stop** saying the name of the sprite when it is finished drawing.

2.3) **Modify** your code so that each different shape is drawn in a **_different_** color and with a **_different_*** line ***_thick_***ness*. So, for example, if the square is drawn in **blue** with a line thickness of 3, each other shape must be drawn in a color that is **not** blue and with a line thickness that is **not** 3. You can choose whatever colors your want.

2.4) **Add** code so that the sprite is hidden when it is not drawing. This is will make sure that the sprite is not obstructing the view of your beautiful artwork!
<commit_msg>:collision: code!<commit_after>---
layout: "post"
title: "Lab 1⃣.1⃣"
date: "2016-09-15 07:32"
---

# Geometric Fun Times™

In this lab, you will write your first SNAP programs to draw some simple shapes on the stage.

## 1. Drawing a square

1.1) Write a SNAP script that **draws a square** when the **number `1`** is pressed on the keyboard. Remember that each corner of a square is a 90° angle.

1.2) **Add code** so that the sprite **says the word "square"** while it is drawing. The sprite should **stop** saying "square" once it has finished drawing the square.

1.3) **Add code** so that pressing the spacebar clears the pen marks from the stage.

Comment your code explaining your work.

## 2. Adding more shapes

2.1) Now that you've drawn a square, add code to draw the shapes in the following table. Each shape should be drawn when the number next to it is pressed on the keyboard. (For example, pressing 3 on the keyboard should draw a diamond.)

<table>
  <tr>
    <td>When this key is pressed...</td>
    <td>Draw a ...</td>
  </tr>
  <tr>
    <td><code>1</code></td>
    <td>Square</td>
  </tr>
  <tr>
    <td><code>2</code></td>
    <td>Equilateral triangle</td>
  </tr>
  <tr>
    <td><code>3</code></td>
    <td>Diamond</td>
  </tr>
  <tr>
    <td><code>4</code></td>
    <td>Pentagon</td>
  </tr>
  <tr>
    <td><code>5</code></td>
    <td>Parallelogram ("leaning rectangle")</td>
  </tr>
  <tr>
    <td><code>6</code> </td>
    <td>5-pointed star</td>
  </tr>
</table>


You will probably want to draw a sketch of each to figure out the angles in each shape.

2.2) **Add code** so that as each shape is being drawn, the sprite is saying the name of shape. The sprite should **stop** saying the name of the sprite when it is finished drawing.

2.3) **Modify** your code so that each different shape is drawn in a **_different_** color and with a **_different_*** line ***_thick_***ness*. So, for example, if the square is drawn in **blue** with a line thickness of 3, each other shape must be drawn in a color that is **not** blue and with a line thickness that is **not** 3. You can choose whatever colors your want.

2.4) **Add** code so that the sprite is hidden when it is not drawing. This is will make sure that the sprite is not obstructing the view of your beautiful artwork!

{'fraction_non_alphanumeric': 0.1290251433612704, 'fraction_numerical': 0.018967798853109837, 'mean_word_length': 3.352207293666027, 'pattern_counts': {'":': 0, '<': 103, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917296', 'n_tokens_mistral': 1524, 'n_tokens_neox': 1453, 'n_words': 701}