For loops in Javascript are written and executed in the same manner as the Karel exercises. However, now we explore in more detail the other parts of the loop besides using it as just a counter. We can modify the initialization statement, test statement, and increment statement. The caterpillar problem is one of the more challenging problems because it has students combine several concepts. You will probably spend a week on for loops.

Objective

Students will be able to…

  • Explain the purpose of for loops
  • Create for loops to solve increasingly challenging problems
  • Create nested for loops: for loops inside of for loops

Activities

These are all the activities included in the lesson.

Activity

4.7.1 For Loop Examples

Video

4.7.2 For Loop Examples Quiz

Quiz SHOW ME

4.7.3 For Loop Sum

Example

4.7.4 Better Sum

Exercise SHOW ME

4.7.5 Factorial

Exercise SHOW ME

4.7.6 All Dice Values

Exercise SHOW ME

Leave a Reply

Your email address will not be published. Required fields are marked *