nerdexam
GIAC

GPYC · Question #69

What will be the value of the i variable when the while loop finishes its execution? i = 0 while i != 0: i = i + 1 else: i = i + 1

Sign in or unlock GPYC to reveal the answer and full explanation for question #69. The question stem and answer options stay visible for context.

Python Fundamentals & Command Line Tools

Question

What will be the value of the i variable when the while loop finishes its execution? i = 0 while i != 0: i = i + 1 else: i = i + 1

Options

  • A1
  • B0
  • C2
  • DThe variable becomes unavailable

Unlock GPYC to see the answer

You've previewed enough free GPYC questions. Unlock GPYC for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#while loop#else clause#loop execution#control flow
Full GPYC Practice