Please enable JavaScript to use CodeHS


Coding in Math

Lessons

  1. Sweet Factors

    1. 1.1 Factors and Programming

    2. Description

      In this lesson, students will get an overview of the project and start learning about factors and basic calculations in Python.

    3. Objective

      Students will be able to…

      • Define the goal of the project.
      • Describe what Python is and where it is used.
      • Write basic print() functions.
      • Write basic math calculations.
    4. 1.2 Programming with Variables

    5. Description

      In this lesson, students learn about variables in Python and how to use them effectively in their programs.

    6. Objective

      Students will be able to:

      • Use Python variables effectively in their code.
    7. 1.3 Modulus and If Statements

    8. Description

      In this lesson, students learn about the modulus calculation and Python if statements in order to begin to automate their candy bagging programs.

    9. Objective

      Students will be able to:

      • Use the modulus to calculate the remainder of a division problem.
      • Use a Python if statement to check if a condition equals a value.
    10. 1.4 For Loops

    11. Description

      In this lesson, students learn about for loops as an efficient technique to repeat code a specific number of times.

    12. Objective

      Students will be able to:

      • Explain how to repeat code in Python.
      • How to correctly use a for loop.
    13. 1.5 Pulling It All Together!

    14. Description

      In this lesson, students pull together all they’ve learned in this module to write a program that calculates all of the factors of a number.

    15. Objective

      Students will be able to:

      • Use Python variables, if statements, and for loops to write a program that finds all the factors of a number.
      • Understand what the Greatest Common Factor (GCF) between two numbers is.
      • Write a program to calculate the GCF.
  2. Shapes and The Pythagorean Theorem

    1. 2.1 Math and Programming

    2. Description

      In this lesson, students will get an overview of the project and start learning about basic calculations and print functions in Python.

    3. Objective

      Students will be able to…

      • Define the goal of the project.
      • Describe what Python is and where it is used.
      • Write basic print() functions.
      • Concatenate strings in the print() function.
      • Write basic math calculations.
    4. 2.2 Programming with Variables

    5. Description

      In this lesson, students learn about Python variables and how to use them effectively in their programs.

    6. Objective

      Students will be able to…

      • Define what a variable is.
      • Use different types of variables in their programs.
    7. 2.3 The Pythagorean Theorem

    8. Description

      In this lesson, students calculate the length of the hypotenuse of a right triangle using the Pythagorean theorem. Using variables and the sqrt() method imported from the math module, students create a Python program that calculates the hypotenuse for any given right triangle.

    9. Objective

      Students will be able to?

      • use the Pythagorean theorem to find side lengths of right triangles.
      • import the Python math module and use its method for mathematical tasks
    10. 2.4 Getting User Input

    11. Description

      In this lesson, students learn how to get input from the user using the input() function. By default, the input from the user is read as a string. Students will convert input values into a numerical data type (e.g. int) to perform arithmetic operations and then convert calculations into a string in order to print the results.

    12. Objective

      Students will be able to?

      • get input from the user using the input() function
      • convert input values into the appropriate data type using the int() or float() functions.
    13. 2.5 Final Roofing Project

    14. Description
    15. Objective
  3. The Formula Solver

    1. 3.1 Printing, Variables, and Math

    2. Description

      In this lesson, students will get an overview of the project and start learning about how to write arithmetic expressions, assign values to variables, and call the print function in Python.

    3. Objective

      Students will be able to…

      • Define the goal of the project.
      • Describe what Python is and where it is used.
      • Write basic print() functions.
      • Concatenate strings in the print() function.
      • Write basic math calculations.
      • Define what a variable is.
      • Use different types of variables in their programs.
    4. 3.2 Getting User Input

    5. Description

      In this lesson, students learn how to get input from the user using the input() function. By default, the input from the user is read as a string. Students will convert input values into a numerical data type (e.g. int) to perform arithmetic operations and then convert calculations into a string in order to print the results.

    6. Objective

      Students will be able to?

      • get input from the user using the input() function
      • convert input values into the appropriate data type using the int() or float() functions.
    7. 3.3 Making Decisions

    8. Description
    9. Objective
    10. 3.4 The Formula Solver

    11. Description
    12. Objective
  4. Vector Math

    1. 4.1 Vectors vs Scalars

    2. Description

      In this lesson, students learn about scalar and vector measurements, and how to identify whether a measurement is one or the other.

    3. Objective

      Students will be able to…

      • Define a vector and scalar measurement.
      • Understand the difference between vector and scalar measurements.
      • Understand that vectors are represented by arrows, with a magnitude and direction.
    4. 4.2 Vectors and Programming

    5. Description

      In this lesson, students will learn about a vector’s components, what they physically represent, how to calculate them, and how to use Python to make those calculations.

    6. Objective

      Students will be able to…

      • Describe what a vector’s components are and what the mean.
      • Use trigonometry to calculate a vector’s X and Y components.
      • Use Pythagorean Theorem to calculate the magnitude of a vector from its components.
      • Use Python to perform the vector component calculations.
    7. 4.3 Variables and Arrays

    8. Description

      In this lesson, students learn about variables and NumPy arrays in order to improve control and efficiency within their programs.

    9. Objective

      Students will be able to:

      • Conceptually understand what variables and arrays are.
      • Store single values in variables and 2+ values in arrays.
      • Use variables and arrays in their programs.
      • Access single values stored within an array.
    10. 4.4 Vector Arithmetic

    11. Description

      In this lesson, students learn how to add and subtract vectors graphically and with their X and Y components.

    12. Objective

      Students will be able to:

      • Add and subtract vectors using the Tip-to-Tail technique.
      • Add vectors using their X and Y components.
      • Use Python to compute vector arithmetic.
  5. Categorizing Triangles

    1. 5.1 Calculating Area

    2. Description

      Students will learn about functions and parameters, and take an in-depth look at a function that prints text to the screen. They will write an equation to calculate area of a triangle and use a function to print the area value to the screen.

    3. Objective

      Students will be able to:

      • Use functions, parameters, and variables to calculate area of a triangle
      • Print the calculated area to the screen
    4. 5.2 Categorizing Triangles with a Static Base Value

    5. Description

      Students will learn about if/else statements and conditions in order to categorize triangles into one of 4 categories- Acute, Obtuse, Right, and Equilateral. They will also learn how to write and use comparison and logical operators in Python programs.

    6. Objective

      SWBAT use comparison and logical operators to write if/else statements that correctly categorize triangles.

    7. 5.3 Categorizing Triangles with a Varied Base Value

    8. Description

      Students will learn more about variables and will use algebra to rearrange equations to solve for unknown values. They will also learn to use the ?round? and ?sqrt? functions.

    9. Objective

      SWBAT write a more reusable program that will check for triangle type with any given base value.

  6. Building Mathematical Models

    1. 6.1 Modeling with Tracy

    2. Description

      In this lesson, students will learn how to create graphs with Tracy the Turtle. They will use these graphing skills to model real-life systems, including weather and finances.

    3. Objective

      Students will be able to:
      -Build mathematical models of real-life systems by writing Python turtle graphics programs.

  7. Orbital Precision

    1. 7.1 Precision of Pi

    2. Description
    3. Objective