3.4 - Do While

Repeat, Repeat, Repeat, Repeat...


  • Cyber Tooth Tigers - can we meet tomorrow at lunch?

    • Teams are approved!

    • Google Chat group

    • Only have 4 days next week for training!

  • Task for 3.3 (Area, perimeter, etc...)


  • We can now:

    • control input & output

    • store values and manipulate them

    • control code with if-statements

    • "chunk" code in functions that only run when commanded.

Today's Lesson: 3.4 - Repeating Code

What if you need a block of code to happen repeatedly? Perhaps you are asking the user for a number and they keep entering text (or nothing at all). In programming, this is called a loop. There are three basic loops and today we will discuss two of them: While and Do While.

In-class demo on While Loops will be found here.

w3schools page on While Loops

Today's Task(s) / Homework

  • Fork this Repl. It is a new guessing game where the user guesses until they get it right!

  • Work on completing the task for 3.3