Lesson 15: For Loops with Artist
60 minutes
Overview
In this skill-building lesson, students practice “for” loops with Artist. Students will complete puzzles to create complex designs and unique art.
Purpose
Creativity and critical thinking come together beautifully in this lesson. Students will continue their practice with for loops and variables while they create jaw-dropping images. This lesson inspires a creative mind while teaching core concepts to computer science.
Standards
AP - Algorithms & Programming
- 1B-AP-09 - Create programs that use variables to store and modify data.
- 1B-AP-11 - Decompose (break down) problems into smaller, manageable subproblems to facilitate the program development process.
Agenda
Objectives
Students will be able to:
- Recognize when to use a for loop and when to use other loops such as repeat and while loops.
- Use for loops to change loop several times with different values.
Preparation
- Play through the puzzles to find any potential problem areas for your class.
- Make sure every student has a reflection journal.
Vocabulary
- For Loop - Loops that have a predetermined beginning, end, and increment (step interval).
Teaching Guide
Warm Up (15 minutes)
Introduction
On a board displayed to the entire class, draw (or display via projector) one of the final designs from the Code Studio puzzles associated with this lesson. We recommend one of the following:
Ask the class how a computer might draw the drawing you displayed.
After a few predictions have been said, reply with for loops of course!
Tell the students they will soon be learning how to create these fine drawings using for loops and variables.
Main Activity (30 minutes)
These puzzles are super fun, but it may be helpful for students to have protractors, pencils and scratch paper to see how these designs were made in the physical form. If that isn't an option in your class, try to get the students to trace on the computer screen with their fingers.
Wrap Up (15 minutes)
Reflection
Prompts:
- What was today’s lesson about?
- How did you feel during today’s lesson?
- Draw one of the designs you made today. What was the code needed to create it?
- What are some designs you would like to create? How do you think for loops or variables could help create those?
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.