nerdexam
Cisco

350-401 · Question #1213

A script contains the statement "while loop != 999:" Which value terminates the loop?

The correct answer is C. A value equal to 999.. Explanation Option C is correct because the while loop continues executing as long as the condition loop != 999 is True - meaning the loop keeps running when loop is not 999, and stops (terminates) the moment loop equals 999, making the condition False. Option A is wrong because

Submitted by yuriko_h· Mar 6, 2026Automation

Question

A script contains the statement "while loop != 999:" Which value terminates the loop?

Options

  • AA value not equal to 999.
  • BA value less than or equal to 999.
  • CA value equal to 999.
  • DA value greater than or equal to 999.

How the community answered

(27 responses)
  • A
    4% (1)
  • C
    93% (25)
  • D
    4% (1)

Explanation

Explanation

Option C is correct because the while loop continues executing as long as the condition loop != 999 is True - meaning the loop keeps running when loop is not 999, and stops (terminates) the moment loop equals 999, making the condition False.

  • Option A is wrong because a value not equal to 999 is precisely what keeps the loop running, not what stops it.
  • Option B is wrong because "less than or equal to 999" is irrelevant - this is a != (not-equal) condition, not a <= comparison.
  • Option D is wrong for the same reason as B - "greater than or equal to" describes a >= operator, which is not used here.

Memory Tip: Think of != as meaning "not equal to" - the loop runs while the condition is True (i.e., while the value is NOT 999). As soon as the value matches 999, the condition becomes False and the loop exits. The terminating value is always the one that breaks the condition.

Topics

#Scripting#Loops#Control Flow#Programming Fundamentals

Community Discussion

No community discussion yet for this question.

Full 350-401 Practice