This course is part of Coding/STEAM Curriculum  Middle School Plan
Python 201
A deeper look at Python for intermediate or advanced coders in upper middle or high school with a focus on realworld computing problems. Request Quote
Course Summary
 Grades 8+
 Advanced level
 15 lessons
 Python

 Web
Course Includes
 15 lessons
 129 activities
 Enhanced Creativity Tools
 Automatic Assessment
 Tutorials and Reviews
 Coding Puzzles
 DIY Projects
 Quizzes
 Answer Keys
Prerequisites
No previous coding experience required.
Lesson Plan
Lesson: Turtle Graphics
Time: 40+ mins
Introduction
In this lesson, students will learn to import and use the turtle library to create graphics, draw shapes, and create fun animations!Vocabulary
 Library: A collection of predefined functions and values that can be imported into your program. Here are different ways that you can import the whole library:
 Use the import keyword:
import {libraryname}  Import a particular function from the library:
{library name} import {function name}
 Use the import keyword:
 Turtle Library: A library that defines a turtle object that can be used to draw shapes, lines, and colors.
 Object: A Python object contains variables, functions, and values that correspond to that particular version of the item. For example, each Turtle object that is created has the functions forward() and backward() that can be used by the object created. The turtle object also stores the color that has been most recently used so that the color can be used again.
 Pixel: A single dot on your computer screen. Computer screen resolutions are described in terms of how many pixels there are horizontally and vertically.
Objectives
Students will... Import and use multiple programming libraries
 Use the turtle library like a pen to draw different shapes and images
 Change the color of the Turtle object
Materials
 Computers (1 per student) with student account access to Tynker.com
WarmUp (5 minutes)
Lead a short discussion with your students: As a class, discuss why programmers might apply graphics in their work. Is it for a game (e.g., hangman)? An artsy project?
Activities (35 minutes)
Facilitate as students complete the Turtle Graphics modules on their own:1. Libraries (Tutorial)
 Students will read a short document that explains libraries in Python.
 Emphasize to students that they can think of “math.sqrt” as “from the math library, get the sqrt function.”
 Optional: Ask students, “What is a library?” (a collection of predefined functions and values)
 Tell students to click the “Next” button (located at the bottom of the document) to move on to the next module.
 In this module, students will need to identify and correct errors in the given code.
 Note: Students are provided information on how to fix the syntax errors.
 Students will read a short document that introduces additional libraries such as the random library and the time library.
 Ask students to run the random library example several times. Why does the output change each time they run it?
 Optional: Ask students how the random library example is different from the time library example? How are they similar?
 Tell students to click the “Next” button to move on to the next module.
 Students will read a short document that explains the turtle library.
 Encourage students to slightly modify the code in the “moving” and “turning” examples. How do their changes affect the output?
 Are students struggling with the “Draw a polygon” DIY? Tell them to draw a square and use the code in the “turning” example as a reference.
 Are students struggling with the “Draw a star” DIY? Give a hint: Tell students to use “left(angle)” function, which turns the turtle left by the given angle. Also, tell students to use the “right(angle)” function, which turns the turtle right by the given angle.
 Check that students are adding different colors to their “Draw a star” DIY.
 Are students struggling with the “Chinese numbers” DIY? Tell them to use the code in the “pen control” example as a reference.
 Remind students to click the “submit project” button when they are done with their DIY projects—that way, you can check out their fabulous creations!
 Tell students to click the “Next” button to move on to the next module.
 In this module, students will use the turtle library and apply their knowledge of turtle graphics to draw a creative scene.
 Optional: Review the given documentation with your students.
 Are students struggling with their syntax? Tell them to use the code in the previous module as a reference.
 Remind students to click the “submit project” button when they are done with their DIY project.
 Tell students to click the “Next” button to move on to the next module.
 Students will read a short document that explains how to apply math concepts to draw shapes.
 Encourage students to slightly modify the code in the provided examples. How do their changes affect the output?
 Are students struggling with the “Target practice” puzzle? Give a hint: Tell students to use the “pen up” and “pen down” features.
 Students will read a short document that explains how to apply the “begin_fill()” and “end_fill()” functions.
 Encourage students to slightly modify the code in the provided examples. Here are some ideas: change the color, change the distance, draw a square, draw an orange rectangle.
 IIn this module, students are introduced to the “speed()” function, which tells a turtle how fast to move while creating graphics.Emphasize to students that the turtle moves fastest when the speed is set to 0. For example,
t = Turtle()
t.speed(0)  Encourage students to experiment with different speeds.
 Unlike previous quizzes, this quiz requires students to apply concepts from this lesson to create a detailed scene. There are no multiple choice questions.
 Students are provided a suggestion of what to crate, but encourage them to display their knowledge by creating their own unique creations.
 Optional: As a class, brainstorm possible scenes your students would like to create.
Discussion Questions/FollowUp Activities (20 minutes)
Lead a discussion with your students: Who can describe one thing they learned today about turtle graphics?
 List different ways you can apply turtle graphics to a computer program.
 How are turtle graphics different from our previous textbased lessons? How are they similar?
US Standards
 CCSSELA: SL.8.1, RI.910.3, RI.910.6, RI.1112.3, RI.1112.6, L.910.3, L.910.6, L.1112.3, L.1112.6
 CCSSMath: HSN.Q.A.1, HSN.Q.A.2, HSN.Q.A.3, HSA.CED.A.1., HSA.CED.A.3, MP.1, MP.2, MP.4
 CSTA: 2AP11, 2AP13, 2AP16, 2AP17, 3AAP17, 3BAP11, 3BAP22
 CS CA: 68.AP.11, 68.AP.13, 68.AP.16, 68.AP.17, 912.AP.12, 912.AP.16
 ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b