do/while loops

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

do/while loop

Checks the condition after each iteration before looping back.

loop

a structure that tells a computer to execute a set of statements multiple times.

Before

a while loop checks the loop condition __________________________________ each iteration of the code inside.

for loop

can allow for a set number of loop iterations.

while loop

executes as long as a certain condition is true.

Endwhile

loops that use ___________________________________________ syntax can be more readable than the equivalent syntax involving curly braces.

alternative syntax for while loops

1. colon after the end parenthesis 2. semicolon after the endwhile statement.

Infinite loop

A loop that never exists.

while loop

For situations of randomness where you don't know how many times the loop will repeat

Loop

If you have a process that you want repeated hundreds of times, you should put it in a ____________________________so you don't need to write hundreds of lines of code.

True

In a while loop, the statements inside the curly braces { and } are executed as long as the condition cond is evaluated as _________________.

The Syntax you prefer

Which syntax you should use?

At least once

With a do/while loop, the code inside the loop will execute __________.


Ensembles d'études connexes

Chapter 11 Practice Questions: Cardiovascular System

View Set

Art Appreciation Final Exam Study Guide

View Set

BU 300 Building Management Skills, Chapters 10-16, Multiple Choice

View Set