< Coding a Geometric Star Quilt

Lesson 2: Getting Started with The Artist

45 minutes

Overview

This skill-building lesson provides an opportunity for students to become familiar with the Artist Tool and to build important coding skills. Students learn how the stamping tool works, how to turn x degrees in an angle, and how to use loops. Students will create a simple star shape. By the end of the levels, students will manipulate angle measurements to see the effect on the number of points on the star. Computers allow for accuracy and precision in studying shapes and patterns because images are generated in a matter of seconds instead of relying on hand-drawn shapes.

Purpose

In this lesson you will be introduced to the Artist. You will program the Artist to create a star shape. It will be important to notice patterns in the shapes.

CSTA K-12 Computer Science Standards (2017)
    • 1B-AP-10 - Create programs that include sequences, events, loops, and conditionals.
    • 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.
    • 1B-AP-12 - Modify, remix or incorporate portions of an existing program into one's own work, to develop something new or add more advanced features.
    • 1B-AP-15 - Test and debug (identify and fix errors) a program or algorithm to ensure it runs as intended.
Common Core Math Standards
    • 3.G.1 - Understand that shapes in different categories (e.g., rhombuses, rectangles, and others) may share attributes (e.g., having four sides), and that the shared attributes can define a larger category (e.g., quadrilaterals). Recognize rhombuses, rectangles, a
    • 5.G.4 - Classify two-dimensional figures in a hierarchy based on properties.
    • 4.MD.5 - Recognize angles as geometric shapes that are formed wherever two rays share a common endpoint, and understand concepts of angle measurement:

Agenda

Objectives

Students will be able to:
  • Identify patterns within their code
  • Inspect the relationship between the angle the Artist turns and how many points are in a star
  • Use The Artist coding tool to replicate their Star Quilt design
  • Use loops to make their code more efficient

Preparation

  • Play through the levels and review the lesson slides 
  • Decide on pacing between student work time and whole group instruction.
  • Consider exploring the recommended preparation activities before beginning (link).
Optional:
  • [Optional] Review this teacher’s guide to debugging to be prepared to help students find and fix errors in their code.
  • [Optional] Pair Programming - Decide if you want students to engage in pair programming. Watch this video and visit this Support page for more information.
  • [Optional] If your classroom has pattern blocks, place some at student desks.

Links

Heads Up! Please make a copy of any documents you plan to share with students.

For the teachers
For the students

Vocabulary

  • Artist - You can write code to make him draw almost anything
  • Concentric - Objects or shapes that share the same center
  • Loop - A sequence of code that is repeated
  • Point - One part of the star shape
  • Row - In this case, a orderly line of rhombuses

Teaching Guide

Recommended Preparation

Content Corner

Math: Students will be working with shapes and angles in this module. To build familiarity, we recommend playing these active songs Types of Angles song (2:47 minutes) and Angles & Lines (3:06 minutes).

These are a few children's books to build some background knowledge and deepen connections to the real world:

Computer Science: In this module, students will use Code.org's Artist tool. If students are not yet familiar with it, we recommend trying Intro to Artist lesson (50 minutes) for a basic introduction to the tool.

Warm Up (10 minutes)

Display: Show first “Share Out” slide

Discuss:

  • What patterns do you see in the flower?
  • What patterns do you see in the turtle shell?

Discussion Goal: Students will have a variety of answers, but emphasize how both natural patterns include repetitions and “growing out” patterns similar to the star quilt designs from yesterday. Other responses may include:

  • All of the petals are the same shape
  • All of the petals perfectly fit together
  • Petals start in the middle and extend out
  • There are fewer petals in the middle of the flower compared to the outer rows of the flower
  • The same turtle shape is repeated over and over
  • There are smaller turtle shapes within the bigger shapes

Display: Show second “Share Out” slide

Discuss: What other visual patterns can you think of that you’ve seen before?

Discussion Goal:
Here are some examples of visual patterns out in the world:

  • Tree trunks
  • Honeycomb
  • Snake scales
  • Corn on the cob
  • Pineapple
  • Brick wall
  • Tile floors
  • Soccer balls

Display: Show “Vocabulary” slides

  • Artist - You can write code to make him draw almost anything
  • Concentric - Objects or shapes that share the same center
  • Loop - a sequence of code that is repeated
  • Point - one part of the star shape
  • Row - in this case, a orderly line of rhombuses

Remarks

Today we’re going to learn how to create our own visual patterns with a tool called the Artist.

Activity (30 minutes)

Display: Show “Level 1 - Introducing the Artist” video

Display: Show “Support with Coding” slide

Remarks

Each level has built-in supports to help you as you code. Before you add any blocks, make sure to read the instructions. Then look at the image of the finished example next to the instructions.

This example will also appear as a shadow design in your play space and your design will go on top. Click “Run” to check your code each time you change something. If you’re feeling stuck, many levels have hints available. You can find these by clicking on the light bulb in the instructions panel.

Teaching Tip

While circling the room, encourage students to:

  • Take Their Time: Staying on a level and tinkering with their code is highly encouraged. The instructions tell students generally what to do, but they should also feel free to try out their own ideas.
  • Show off a completed level: Any level bubble that is fully green means the student successfully completed all the requirements for that level. Ask a student to click on a green bubble to show off what they created.

For the times when a student feels stuck:

  • Collaborate with Neighbors: Encourage students to check in with a neighbor when they're getting stuck. Depending on the age and ability of your students, you might consider formally breaking your class into pairs to complete the tutorial using pair programming. Watch this video and visit this Support Page for more information about pair programming.

  • Read the Instructions: The instructions are bulleted points on how to complete the level. If a student feels stuck, ask them to read the instructions out loud to you and ask them to repeat back what the instructions say in their own words. The instructions usually provide helpful tips on how to complete the level. Before giving students the answer, ensure they've carefully looked at the instructions, hints, videos, and any starter code carefully.

  • Text to Speech: Students can also click on this text-to-speech icon to hear the instructions read aloud.

  • Look for hints: Most levels include at least one hint with more explicit details about how to pass the level.

  • Celebrate bugs: Getting a bug in your code is a natural part of the coding process. If the program isn’t doing what they expected, ask the student to first tell you what they want to happen, click run to observe what is actually happening, then find the place in their code that caused the discrepancy. Remember to celebrate finding bugs and fixing bugs. Getting a bug means students are doing a great job building a more complex program.

Display: Show “Level 2-4 - Skill Building” slide

Do This: Transition students to their computers, and have them follow the instructions for each level in the skill building section.

Goal: In the first few levels of this lesson, students will be programming the Artist to draw a 6-pointed star. It is a very simple shape that looks like an asterisk. Students will draw a rhombus, then turn the artist and draw another rhombus. Then they learn how to loop the Artist to repeat a chunk of the code.

  • Level 2: Show students how to drag & drop. Explain that the blocks are like puzzle pieces that must fit together to run. Students may select which color rhombus to use. When finished, students can test their code by pressing “Run.”

  • Level 3: The Artist must turn 60 degrees before stamping the next rhombus. Show students how to use the angle menu to modify the measurement. Explain to students that 60 degrees is the measure of the angle of the rhombus. Students may start anticipating the next lines of code, prompt them to look for patterns.

  • Level 4: Students will need to repeat the code until they have a 6 point star. This includes turning and stamping the rhombus. Prompt students to notice the patterns in the code.

Display: Show “Level 5 - Repeat Blocks” video

  • Level 5: Students will be watching a video about looping here. The video is also provided in the slides. Decide if you would like to have students watch the video independently, or regroup the class and watch the video together.

Display: Show “Level 6-7 - Skill Building” slide

Goal: The next few levels mirror the first levels but with increased complexity.

Debugging Tips:

Level 6: Students should select 90 degrees. Remind students to also alter the loop to only repeat 4 times.

Level 7: Students should modify the angle measurement to 30 degrees. Remind students to also alter the loop to repeat 12 times.

Display: Show “Level 8 - Free Play” slide

Level 8: This is a free play level for students to make their very own star creation. Students will apply the skills they’ve learned in the previous levels. Students can experiment with colors, angles and loops to make a unique star shape.

Teaching Tip

Free Play levels are like offering an artist all the tools they need to fill a blank page. This is an opportunity for students to apply the skills and concepts they learned throughout the progression with a high ceiling for creativity. These levels can be used as assessments if there is a rubric attached to the project.

Wrap Up (5 minutes)

Display: Show “Debrief” slide

Discuss:

  • What patterns do you notice?
  • How does using loops make it easier to code your star patterns?

Discussion Goal: Help students realize the following relationship:

  • If the Artist turns less degrees, then the Artist will create more points in a star.
  • If the Artist turns more degrees, then the Artist will create fewer points in a star.

Remarks

Today we learned how to use the Artist tool to create our very own star designs using different angles and we used loops to speed up our coding. Tomorrow, we’ll extend that to make our very own star quilts!

Extension Opportunities

This module is a great introduction to computer science through the lens of geometry and math. Here are a few options to continue learning more about the concepts introduced in this module. We recommend pursuing these extensions after completing Lesson 3 in this module.

Content Corner

Math Content:

Computer Science Concepts:

Creative Commons License (CC BY-NC-SA 4.0).

This work is available under a Creative Commons License (CC BY-NC-SA 4.0).

If you are interested in licensing Code.org materials for commercial purposes contact us.