GoConqr has a new look! Let us know what you think.

Quiz

Loops: Part II

Code Ramp 5 questions Updated 17 Sep 2019

Take the quiz

This quiz has question types that open in the usual player.

Questions in this quiz (5)

  1. 1Which of the following are valid ways to increment a variable?
    1. A+x
    2. Bx = x + 1
    3. Cx++
    4. Dx += 1
  2. 2What do you call a variable that you use to keep track of the number of iterations that you've gone through in a loop?
    1. Aplaceholder
    2. Bcounter
    3. Ctally
    4. Dnum
  3. 3When you write a loop that doesn't make progress toward the end condition, you might crash your browser by throwing it into an [blank_start]infinite loop[blank_end].
    1. Ainfinite loop
  4. 4How are we using isFinished in the following example?

    var isFinished = false;
    while (!isFinished) {
    if (now > testDeadline) {
    isFinished = true;
    }
    }
    1. AAs a flag
    2. BAs a counter
  5. 5It is not possible to nest one loop within another loop. A loop needs to end completely before starting a new loop.
    1. ATrue
    2. BFalse

Information

Description
Quiz on Loops: Part II, created by Code Ramp on 17/04/2018.
Author
Code Ramp
Language
English
Views
212
History
Created on 17 Apr 2018 · updated on 17 Sep 2019
Tags
toefl
Rating
No ratings yet
Rate this quiz
Rate this quiz

More on Control Structures

Feedback

What is it about?

What do you think of the new look?

How do you like it?