4 - for & while loops

Last updated almost 4 years ago
13 questions
1

for loops are best suited for which of the following purposes?

1

Each time through a loop is called a(n)

1

Which of the following is the right order of the parts of a for loop?

1

Which of the following counts through the numbers 0 to 9 inclusive?

1

Given the line of code:

i=i+1;

What can be said?

1

Which of the following has the same effect as i++ ?

1

Why is it acceptable to use i as a counter variable?

1

while loops are best suited for which of the following purposes?

1

Each time through a while loop is called a(n)

1

Which of the following is the right template for a header line in a while loop?

1

Which of the following is the right template for a header line in a while loop?

1

Which of the following counts through the numbers 0 to 9 inclusive?

1

What is wrong with the following code?

int i=0; while( i<100 ) {
Serial.println(i);
i++;
}
Serial.print("After the loop, i’s valuse is:");
Serial.println(i);