Python_Institute
PCAP-31-03 · Question #56
What will the value of the i variable be when the following loop finishes its execution?
The correct answer is D. 9. Pass only means there are no statements to execute it does not means the variable is unavailable. Try a Print statement Print(i) after the For Loop and there is your result.
Technology and architecture
Question
What will the value of the i variable be when the following loop finishes its execution?
Options
- A10
- Bthe variable becomes unavailable
- C11
- D9
How the community answered
(31 responses)- A3% (1)
- B10% (3)
- C16% (5)
- D71% (22)
Explanation
Pass only means there are no statements to execute it does not means the variable is unavailable. Try a Print statement Print(i) after the For Loop and there is your result.
Topics
#for loop#variable scope#loop execution#Python control flow
Community Discussion
No community discussion yet for this question.