4
AssignmentMultiple Choice

Conditional Statements

Question 4 • VA-Information Technology Fundamentals B

What is a while-loop statement?

Answer
A
a Python construct that repeats until the expression becomes false
B
a Python construct that repeats until the expression becomes true
C
a Python construct that repeats infinitely
D
a Python construct that repeats until the programmer issues code to stop it

Explanation

A while loop checks its condition and keeps executing its body as long as the condition is true. When the expression becomes false, the loop stops, so choice A correctly describes it. A while loop does not necessarily run infinitely; it does so only if its condition never becomes false.

AI-written and checked against the verified answer.

Previous
Next