image
Educational Outreach

Introduction to Programming

Lesson 2: Simple Math

Intro to programming

 

Learning Outcomes 

  • Student will complete code for simple math instructions in C
  • Student will apply the completed code to solve mathematical equations
  • Students will recognize data types, differentiate between them, and apply the data types in code

Materials 

How It Works 

This lesson will teach you how to program a computer to do math for us. By the end of the lesson, you will be able to do simple math equations such as add, subtract, multiply, and divide. This lesson will be a great introduction to students who have not begun algebra.  This lesson also serves as review for those who have. This lesson will work with variables and the order of operations that they are involved in.

Activity 

  1. Explain data types and what they do
  2.  Understand how a computer does math
  3.   Program a simple math equation
  4. Test your math program

Assessment

  1. Apply the steps in this lesson to a simple math equation and create a small program to solve it.
  2. Use the integer 7 so that the sum = 15
  3. Use the integer 9 so that the sum = 3

Additional Resources

  1. Lesson 2 Lesson Plan
  2. Vocabulary
  3. Teachers Guide
  4. https://www.w3schools.com/
  5. https://www.geeksforgeeks.org/c-programming-language/
  6. https://replit.com/languages/c