题目
题目

Fal25_CS003C_74229 Ch. 4 Pre-Quiz (Remotely Proctored)

单项选择题

How many times will the following loop run? i = 0 while i < 10 : print(i) i = i + 1

选项
A.0
B.9
C.10
D.8
查看解析

查看解析

标准答案
Please login to view
思路分析
Consider the loop and how it changes the counter variable step by step. Option 0: '0' — If the loop ran 0 times, the print statement would never execute. But the initial i is 0 and the condition i < 10 is true at the start, so the body executes at least once. Therefore this option is incorrec......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!