Snap Documentation
IntroductionGet startedGlossaryReferences
1.0.0
1.0.0
  • Introduction
  • Get started
    • The First Day
    • Algorithms
    • Programming Languages
    • SNAP Self-Portrait
      • Do now
        • I Am ...
      • Labs
        • Getting to Know You
  • Snap!
    • Getting started with Snap!
      • Labs
        • Welcome to Snap! - Part 1
        • Welcome to Snap! - Part 2
    • Building Blocks
      • Do now
        • Tracing and Debugging
      • Labs
        • SNAP Scavenger Hunt
    • Drawing Shapes
      • Do now
        • Drawing a Triangle
      • Labs
        • Squares, Triangles, and Stars, Oh My!
    • Costumes
    • Animation
      • Do now
        • Sprite Communication
      • Labs
        • Sprites in Action
    • Storytelling
      • Do now
        • Knock Knock
        • Click Event Interaction
        • Movement Interaction
    • Project
      • Animated Storytelling
  • Loops
    • Loops
      • Do now
        • Introduction to Loops
      • Labs
        • Squares and Triangles Redux
    • Nested Loops
      • Do Now
        • Debugging Loops
      • Labs
        • Yellow Brick Road
    • Inputs and Conditionals
      • Do now
        • Stairs
      • Labs
        • What Shape is That?
    • Variables
      • Do now
        • Debugging
      • Labs
        • Guessing Game
    • Boole in the House
      • Do now
        • Variables Practice
      • Labs
        • Triangles of All Kinds
    • Combining Loops and Conditionals
      • Do now
        • Boolean Practice
      • Labs
        • What Goes Up...
    • Quiz
      • Loops
    • Pong
      • Do Now
        • Bouncing Ball
    • Project
      • Pong
      • Pong - Alternative
  • Customization
    • Abstraction and Friends
    • Procedures
      • Do now
        • Drawing Squares
      • Labs
        • Drawing Shapes
    • Customization - Part 1
      • Do now
        • Jumping
      • Labs
        • Let Me Check My Calendar
    • Customization - Part 2
      • Do now
        • Practice using Arguments
      • Labs
        • If My Calculations Are Correct...
    • Quiz
      • Customization
    • Project
      • Platform Game
      • Platform Game - Alternative
  • Lists
    • Intro to Lists
    • Static Lists
      • Do now
        • Letters of a Word
      • Labs
        • You Talkin' to Me?
    • List Practice - Part 1
      • Do now
        • Quote of the Day
      • Labs
        • Guess Who
    • List Practice - Part 2
      • Do now
        • Traversing List
      • Labs
        • Number Cruncher
    • Sequential Search
      • Do now
        • List Tracing
      • Labs
        • It's Around Here Somewhere
    • Lists
    • Guess My Word
      • Do now
        • Gentle Guess My Word
    • Project
      • Guess My Word
  • Cloning
    • Introduction to Cloning
      • Labs
        • Connect the Dots
    • Cloning Sprites
      • Do now
        • Star Wars Troopers
      • Labs
        • Lots of Balls
    • Communicating with Clones
      • Do now
        • Star Wars Troopers using Cloning
      • Labs
        • Fewer Balls
    • Quiz
      • Cloning
    • Space Invaders
    • Project
      • Space Invaders
  • Final Project
    • Design Basics
    • Research and Ideate
    • Defining Requirements
    • Building a Plan
    • Project Implementation
    • Project
  • References
    • How to's
      • Create Snap Account
      • Save & Share Projects
      • Snap Window
      • Sprites
      • Scripts
      • Movement & Position
      • Drawing
    • Readability
    • Snap elements
      • Motion
      • Looks
      • Sound
      • Pen
      • Control
      • Sensing
      • Operators
      • Variables
  • Glossary
Powered by GitBook
On this page
  • Lab
  • 1. Drawing a square
  • 2. Adding more shapes
  • Grading Scheme/Rubric

Was this helpful?

  1. Snap!
  2. Drawing Shapes
  3. Labs

Squares, Triangles, and Stars, Oh My!

PreviousLabsNextCostumes

Last updated 5 years ago

Was this helpful?

Lab

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, as shown in the figure below.

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 space bar clears the pen marks from the stage.

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.)

When this key is pressed...

Draw a ...

1

Square

2

Equilateral triangle

3

Diamond

4

Pentagon

5

Parallelogram ("leaning rectangle")

6 (optional)

5-pointed star

You may want to draw a diagram similar to the one above of a square 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 thickness. 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.

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!

Grading Scheme/Rubric

Lab 1.3 Criteria

1 - Square

0.25 points

2 - Equilateral Triangle

0.25 points

3 - Diamond

0.5 points

4 - Pentagon

0.5 points

5 - Parallelogram

0.5 points

Star (bonus!)

0.5 points

PROJECT TOTAL

2.5 points

square diagram