nerdexam
CompTIA

220-1002 · Question #660

Which of the following basic scripting components can be used to repeat an operation until a specific requirement is met?

The correct answer is C. Conditional loop. A conditional loop (C) is the scripting construct that repeats a block of operations until a specific condition is met. Common implementations include 'while,' 'do-while,' and 'for' loops - all of which check a condition and continue executing until that condition evaluates to…

Hardware and network troubleshooting

Question

Which of the following basic scripting components can be used to repeat an operation until a specific requirement is met?

Options

  • AIf-then logic
  • BString variables
  • CConditional loop
  • DGoto statement

How the community answered

(54 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    93% (50)
  • D
    2% (1)

Explanation

A conditional loop (C) is the scripting construct that repeats a block of operations until a specific condition is met. Common implementations include 'while,' 'do-while,' and 'for' loops - all of which check a condition and continue executing until that condition evaluates to true (or false, depending on design). If-then logic (A) evaluates a condition once and branches - it does not repeat. String variables (B) are data containers, not control flow structures. A goto statement (D) unconditionally jumps to another part of the code and does not inherently repeat based on a condition. Conditional loops are foundational to automation scripting.

Topics

#scripting#conditional loop#programming logic#automation

Community Discussion

No community discussion yet for this question.

Full 220-1002 Practice