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: Math Operators
Time: 40+ mins
Introduction
In this lesson, students will learn to use Python math operators such as addition, subtraction, and division. Additionally, students will practice writing mathematical expressions throughout the modules.Vocabulary
 Operator: A symbol that modifies or combines values. For example, + and  are operators that add or subtract values.
 Expression: A sequence of values or variables connected by operators. For example, the expression b  a + 1 subtracts two variables and then adds the value 1.
 Binary Operator: An operator that only combines two values. Most of the operators that are commonly used in mathematical expressions like / and * are binary operators as the operation only involves the number before and after the operator.
 Modulus: The modulus operator is a binary operator that divides the first number by the second number and returns the remainder from that division operation. If the second number is a factor of the first number, the modulus operator will return 0.
 Incrementing: In programming, incrementing is the process of replacing a variable with the result of an operation and itself that increases the value stored in the variable. For example, x = x + 1 increments the value stored in x by 1.
 Decrementing: In programming, decrementing is the process of replacing a variable with the result of an operation and itself that decreases the value stored in the variable. For example, x = x/2 decrements the value stored in x by half of itself.
Objectives
Students will... Write and apply mathematical expressions
 Apply coding concepts to convert integers to floats
 Use the exponent and modulus operators
 Increment and decrement values stored in variables
 Simulate real world mathematical equations with Python
Materials
 Computers (1 per student) with student account access to Tynker.com
WarmUp (5 minutes)
Ask students to solve the following:1. 10 + 15  1 = ?
2. 4 / 2 = ?
3. 5 * 10 / 2 = ?
4. (2 + 2) * 10 / 5 = ?
Answers:
1. 24
2. 2
3. 25
4. 8
Activities (35 minutes)
Facilitate as students complete the Math Operators modules on their own:1. Addition and Subtraction (Tutorial)
 Students will read a short document that explains the addition and subtraction operator in Python.
 Optional: Before students select the “play” button, ask them to write down what they think the code will output.
 Do students need help with the “100th Birthday” puzzle? Give a hint: Tell them use the code listed above as a reference.
 Students will read a short document that explains the multiplication and division operator in Python.
 Optional: Ask students, “What is a binary operator?” (An operator that combines two values)
 Optional: Before students select the “play” button, ask them to write down what they think the code will output.
 Do students need help with the “Distance, rate, and time” puzzle? Give a hint: Tell students that they will need to divide by 60.
 Do students need help with the “Troll call” puzzle? Give a hint: Tell students that a troll’s name is “tr” concatenated with “ol” repeated “age” times.
 In this module, students will expand on what they learned in the previous lesson about floats.
 Check that students are using floats in their puzzle solution.
 Students will read a short document that explains the float function, which returns its argument as a floating point number.
 Are students struggling with the puzzle? Tell students that they will need to convert values between decimal and integer representations. Optional: Tell students to include this in their code: str(int(applicants * percentage / 100.0))
 In this module, students will learn about exponents and the exponent operator (**).
 Students who are not strong at math are likely to struggle with the “Volume versus surface area” puzzle, so encourage students to brainstorm possible solutions with a partner.
 In this module, students are introduced to the modulus operator (%), which returns the remainder after dividing the number on the left by the number on the right.
 Optional: Before students select the “play” button, ask them to write down what they think the code will output.
 Are students struggling with the “Variable precision” puzzle? Tell them to use the code in the examples above as a reference.
 In this module, students will read a short document that reviews the order of operations.
 Optional: Before students select the “play” button, ask them to write down what they think the code will output.
 Students are introduced to incrementing and decrementing.
 Optional: Before students select the “play” button for the incrementing and decrementing examples, ask them to write down what they think the code will output.
 Say, “When a variable is replaced by a smaller value, the process is called ‘decrementing.’” Emphasize that its previous value is decreasing.
 This module does not contain puzzles.
 In this module, students will learn how to use incrementing and decrementing with other operators.
 The puzzle solutions in this module requires students to write multiple lines of code, so encourage them to work together as they solve the puzzles.
 This module introduces students to Fibonacci numbers and the golden ratio.
 Optional: Do a quick Google Images search of “golden ratio in nature” and show your students how mathematically beautiful nature can be!
 Are students are struggling with the puzzle? Give a hint: Tell them to include 7 additional variables to solve the puzzle.
 In this quiz, students will solve 3 different math operators puzzles.
 In each problem, students will need to correctly apply math operators to produce the expected result.
Discussion Questions/FollowUp Activities (20 minutes)
 Ask students what they learned about using math operators in Python.
 Who can give an example of a math operator and explain how they applied it in today’s lesson?
 Have students create their own math operator problems and test it out using Python.
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, MP.1, MP.2, MP.4
 CSTA: 2AP11, 2AP13, 2AP17, 3AAP17, 3BAP11
 CS CA: 68.AP.11, 68.AP.13, 68.AP.17, 912.AP.12, 912.AP.16
 ISTE: 1.c, 1.d, 4.d, 5.c, 5.d