你还在为考试焦头烂额?找我们就对了!

我们知道现在是考试月,你正在为了考试复习到焦头烂额。为了让更多留学生在备考与学习季更轻松,我们决定将Gold会员限时免费开放至2025年12月31日!原价£29.99每月,如今登录即享!无门槛领取。

助你高效冲刺备考!

题目
题目
单项选择题

Question at position 3 What will be printed on the screen when the following Python code is executed? Hi, there! hi, there!! Hi, there!! Hi, world! Clear my selection

选项
A.Hi, there!
B.hi, there!!
C.Hi, there!!
D.Hi, world!
题目图片
查看解析

查看解析

标准答案
Please login to view
思路分析
To determine what prints, I’ll walk through the code step by step and then evaluate each option. First, text is assigned the string " Hello, World! ". The line s1 = text.strip().lower() removes surrounding spaces and converts to lowercase, giving "hello, world!". Next, s2 = s1.replace("hello", "hi").replace("world", "there") processes two replacements in sequence: replacing 'hello' with 'hi' yields "hi, world!", and then r......Login to view full explanation

登录即可查看完整答案

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

类似问题

更多留学生实用工具

为了让更多留学生在备考与学习季更轻松,我们决定将Gold 会员限时免费开放至2025年12月31日!