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
  • Part 1 - Triangle...or no triangle?
  • Part 2 - Name That Polygon!
  • Part 3 - Quadrilateral Fever!
  • Grading Scheme/Rubric

Was this helpful?

  1. Loops
  2. Inputs and Conditionals
  3. Labs

What Shape is That?

PreviousLabsNextVariables

Last updated 5 years ago

Was this helpful?

Lab

In this lab, you will use user input and conditional statements to identify shapes based on the number of sides and some other properties as given by the user.

Part 1 - Triangle...or no triangle?

  1. Write a SNAP program that asks the user to think of a shape and input how many sides it has. Then, if the user is thinking of a triangle, tell him or her so. Regardless of whether or not the shape was a triangle, thank the user for playing.

  2. Modify your program to give an appropriate message both when the user is thinking of a triangle and when he or she is not thinking of a triangle. Give the same thank you message afterward in either case.

Part 2 - Name That Polygon!

You will now expand your program from above so that instead of just deciding if a shape is a triangle or not, your program will be able to name the specific polygon. Your program must be able to identify at least the following shapes:

Number of sides

Polygon name

3

Triangle

4

Quadrilateral

5

Pentagon

6

Hexagon

any other number

Unknown

  1. Fill out a for the above program. Make sure you consider all aspects of the program carefully.

  2. Write the program. Be sure that your program works correctly in all cases.

Part 3 - Quadrilateral Fever!

Quadrilaterals come in many different varieties. Add code to your program so that, if the user is thinking of is a quadrilateral, you ask more questions to find out which type of quadrilateral it is. Your program should give the most specific name that applies. The following table describes the quadrilaterals you should know about from most to least specific:

Property

Quadrilateral name

All four sides have the same length and all four angles have the same measure

Square

Not a square and all four angles have the same measure

Rectangle

Not a rectangle and each side is parallel to one other side

Parallelogram

Not a parallelogram and two sides are parallel to each other

Trapezoid

Not a trapezoid

Unknown quadrilateral

  1. Write the program. Be sure that your program works correctly in all cases.

Grading Scheme/Rubric

Lab 2.3 Criteria

1 Identifies triangle

0.5 points

2 Identifies polygons

1.0 points

3 Identifies quadrilaterals

0.5 points

PROJECT TOTAL

2.0 points

Fill out a for the above program. Make sure you consider all aspects of the program carefully.

Planning Worksheet
Planning Worksheet