# Lesson 5: Nested Loops in Artist

## Overview

Students will create intricate designs using Artist in today's set of puzzles. By continuing to practice nested loops with new goals, students will see more uses of loops in general. This set of puzzles also offers a lot more potential for creativity with an opportunity for students to create their own design at the end of the stage.

## Purpose

In this online activity, students will create designs in Artist that they can proudly share with their loved ones.

The purpose of this activity is to utilize nested loops as a way to inspire students with artistic minds to see coding as another creative outlet. This set of puzzles was built to develop critical thinking skills, an understanding of elementary geometry, and creativity -- all within the scope of nested loops!

## Objectives

### Students will be able to:

• Combine simple shapes into complex designs with nested loops.
• Count the number of times an action should be repeated and represent it as a loop.
• Break complex tasks into smaller repeatable sections.

## Preparation

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

## Vocabulary

• Loop - The action of doing something over and over again.
• Repeat - Do something again

# Teaching Guide

## Warm Up (10 min)

### Introduction

Review using nested loops in Maze.

Ask the students how they felt about nested loops.

• What did they like and dislike about them?
• What are some advantages of using nested loops?

Tell the students that they will be using nested loops again, but in Artist this time. They will be making amazing projects today!

## Main Activity (30 min)

### Course D Online Puzzles - Website

Teacher Tip

Students will have the opportunity to share their own work at the end of this stage. These pieces of artwork can be shared virtually or printed out. We recommend printing out the class's work and displaying it for the students' loved ones to see.

Students might benefit from having a puzzle done as a class. If you believe your class could benefit from that, we recommend puzzle 2 of stage 5.

We highly recommend Pair Programming - Student Video in this lesson. This may not be an easy topic for the majority of your students. Working with a partner and discussing potential solutions to the puzzles might ease the students' minds.

Be sure to have paper and pencils nearby for students to write out their plan before coding. Some puzzles have a limit on the number of certain blocks, so paper can be helpful if students like to write out the long answer before searching for repeating patterns.

## Wrap Up (15 min)

### Flash Chat: What did you make today?

Get the class together and allow time for students to show off their Artist drawings! Make sure everyone feels included by checking that every student is done with their Artist drawing before starting the presentations. Discuss how each drawing was made and what was in the student's nested loop.

### Journaling

Having students write about what they learned, why it’s useful, and how they feel about it can help solidify any knowledge they obtained today and build a review sheet for them to look to in the future.

#### Journal Prompts:

• What was today's lesson about?
• How did you feel during today's lesson?
• Draw something you used nested loops to make.
• How do nested loops help you code complex images?

## Extended Learning

#### Together We Draw

Have the students pair up with two pieces of paper. Partners should individually draw a shape or simple pattern. Once the simple pattern has been drawn, have the partners switch papers. Now each partner must repeat that pattern how ever many times they want. For example, if one partner draws a square, the other partner can make a rectangle made up of squares! If one partner draws a staircase pattern, the other student can fill the page with staircases! Each pair will have a set of unique drawings. If there's time, have students discuss how they might code their drawings.

Here are some examples:

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

Now loop the triangle 6 times.

After each triangle, you'll need to turn 60 degrees before drawing the next.

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

This time, complete the puzzle with the fewest number of blocks possible.

After each triangle, you'll need to turn 60 degrees before drawing the next. See how much easier this is with nested loops?

View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

Great! Do the same thing with these circles.

• Each circle is made by moving 1 pixel before turning 1 degree, 360 times.
• Each circle begins just 50 pixels from where the last one ended
View on Code Studio

### Student Instructions

What happens if you also turn 90 degrees between circles?

(To get this image, you still need to jump 50 pixels between circles)

View on Code Studio

### Student Instructions

Use what you've learned to make this drawing.

• The squares each have 100 pixel sides and 90 degree angles
• You will need to turn 60 degrees between each square. Why? Because there are 6 squares, and 360 degrees (a full turn around) divided by 6 is 60 degrees.
• Make sure you jump 50 pixels to get to the next square
View on Code Studio

### Student Instructions

Using what you have learned in the last couple of puzzles, build this image from the beginning.

• Each hexagon has 50 pixel sides and 60 degree angles
View on Code Studio

### Student Instructions

Challenge: Can you figure out how to make a picture like this?

• Both shapes have 50 pixel sides
View on Code Studio

### Student Instructions

View on Code Studio

### Student Instructions

Challenge: Can you figure out how to make a picture like this?

• Both shapes have 50 pixel sides

Take a good look at the code below. Which drawing will this program make when you click "Run"?

A

B

C

I don't know.

View on Code Studio

### Student Instructions

Now it's your turn. Take the skills you have learned and make something that you love!

Need an idea? Try to make one of these:

## Standards Alignment

#### CSTA K-12 Computer Science Standards (2017)

AP - Algorithms & Programming
• 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.

## Cross-curricular Opportunities

This list represents opportunities in this lesson to support standards in other content areas.

#### Common Core English Language Arts Standards

L - Language
• 3.L.6 - Acquire and use accurately grade-appropriate conversational, general academic, and domain-specific words and phrases, including those that signal spatial and temporal relationships (e.g., After dinner that night we went looking for them).
SL - Speaking & Listening
• 3.SL.1 - Engage effectively in a range of collaborative discussions (one-on-one, in groups, and teacher-led) with diverse partners on grade 3 topics and texts, building on others’ ideas and expressing their own clearly.
• 3.SL.1.b - Follow agreed-upon rules for discussions (e.g., gaining the floor in respectful ways, listening to others with care, speaking one at a time about the topics and texts under discussion).
• 3.SL.6 - Speak in complete sentences when appropriate to task and situation in order to provide requested detail or clarification.

#### Common Core Math Standards

G - Geometry
• 3.G.2 - Partition shapes into parts with equal areas. Express the area of each part as a unit fraction of the whole. For example, partition a shape into 4 parts with equal area, and describe the area of each part as 1/4 of the area of the shape.
MP - Math Practices
• MP.1 - Make sense of problems and persevere in solving them
• MP.2 - Reason abstractly and quantitatively
• MP.5 - Use appropriate tools strategically
• MP.6 - Attend to precision
• MP.7 - Look for and make use of structure
• MP.8 - Look for and express regularity in repeated reasoning
OA - Operations And Algebraic Thinking
• 3.OA.4 - Determine the unknown whole number in a multiplication or division equation relating three whole numbers. For example, determine the unknown number that makes the equation true in each of the equations 8 × ? = 48, 5 = � ÷ 3, 6 × 6 = ?.

#### Next Generation Science Standards

ETS - Engineering in the Sciences
ETS1 - Engineering Design
• 3-5-ETS1-1 - Define a simple design problem reflecting a need or a want that includes specified criteria for success and constraints on materials, time, or cost.
• 3-5-ETS1-2 - Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem.