This lesson introduces students to
until loops, and
if / else statements. While loops are loops that continue to repeat commands as long as a condition is true. While loops are used when the programmer doesn't know the exact number of times the commands need to be repeated, but the programmer does know what condition needs to be true in order for the loop to continue looping.
Until loops keep going until something specific is true.
If / Else statements offer flexibility in programming by running entire sections of code only if something is true, otherwise, it runs something else.
A basic understanding of conditionals is a recommended prerequisite for Course E. We created this introduction to give a review for the students already familiar to conditionals and allow practice for the students that are just learning. If you find that the understanding of conditionals varies widely in your classroom, we recommend a strategic pairing of students when completing this online lesson.
Students will be able to:
- define circumstances when certain parts of a program should run and when they shouldn't.
- determine whether a conditional is met based on criteria.
Note: You will need to create a free account on code.org before you can view this resource.