# Lesson goal: The while-loop and typing words

Previous: Introduction | Home | Next: Average some numbers

As mentioned, while-loops can make a chunk of program code run over and over until the condition of the while-loop becomes false. Here's an example that asks you to type a word. Suppose we want it to stop asking us to type words if we type the word "done" (without the quotes).

The code won't quite work. What condition you put in the while ... do line that is true if word$\ne$"done" and false if word is equal to done?

# Now you try. Put a condition in the while ... do line to stop the while loop when variable word is equal to "done".

This code will not run! What condition will you put in the while loop to cause it to have a true condition as long as the text in variable word is $\ne$ done? Dismiss.
Show a friend, family member, or teacher what you've done!