题目
题目

Fal25_CS003C_74229 Ch. 4 Pre-Quiz (Remotely Proctored)

单项选择题

What is the output of the code snippet given below? s = "abcde" i = 1 while i < 5 : if i > 1 : print(s[i])

选项
A.No output
B.No output (infinite loop)
C.abcde
D.bcde
查看解析

查看解析

标准答案
Please login to view
思路分析
Let's break down what the code is doing step by step, examining each answer choice in turn. Option A: 'No output' — This would imply that the program prints nothing but eventually terminates. However, the loop has no mechanism to terminate or to produce output on the first iteration, because there is no i increment and the print statement is o......Login to view full explanation

登录即可查看完整答案

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

更多留学生实用工具

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