Search Resources

1 Result

View
Selected filters:
  • CS Fundamentals 2019-2124
CS Fundamentals 4.12: While Loops in Farmer
Conditional Remix & Share Permitted
CC BY-NC-SA
Rating

By the time students reach this lesson, they should already have plenty of practice using `repeat` loops, so now it's time to mix things up.

_While loops_ are loops that continue to repeat commands while a condition is met. `While` loops are used when the programmer doesn't know the exact number of times commands need to be repeated, but does know what condition needs to be true in order for the loop to continue repeating. For example, students will be working to fill holes and dig dirt in Farmer. They will not know the size of the holes or the height of the mountains of dirt, but the students will know they need to keep filling the holes and digging the dirt as long as the ground is not flat.

Subject:
Computer Science
Material Type:
Lesson Plan
Provider:
Code.org
Provider Set:
CS Fundamentals 2019-2124
Date Added:
11/06/2019