Please enable JavaScript to use CodeHS

Coding in Math

Sweet Factors

[Middle School, 4-6 Hours] Students leverage computational power to find all of the factors of a number in order to help The Sweet Shop bag its homemade candies.

Lessons

1.1 Factors and Programming

  • The Sweet Shack and Factors
  • Understanding Factors
  • Python and Printing
  • Python Math
  • Bags of Jawbreakers
  • +3 more

1.2 Programming with Variables

  • Programming with Variables
  • Printing with Variables
  • Bags with Variables
  • Multiple Options
  • Chocolate Bar Prototype
  • +1 more

1.3 Modulus and If Statements

  • The Modulus
  • Modulus Calculations
  • The Modulus and If Statement
  • Modulus and Ifs
  • Multiple Options with Ifs
  • +4 more

1.4 For Loops

  • For Loops
  • Coding with For Loops
  • Happy Birthday x100
  • Looping with i
  • Math with i
  • +3 more

1.5 Pulling It All Together!

  • Loops, Ifs, and Modulus
  • Bagging Jawbreakers
  • Loops, Ifs, and Modulus
  • Bagging Jelly Beans
  • Jelly Bean Options
  • +2 more

Courses that include this module