万卷网 > 题目详情
题型:单选题

运行下列程序,输出的结果是?( )

s1 = "Good \n"
s2 = "Morning."
print(s1 + s2)
print(len(s1))
A.

Good Morning.

6

B.

Good

Morning.

6

C.

Good Morning.

7

D.

Good

Morning.

7

更新时间:2024-01-05 15:05:02 |
【知识点】 电子学会Python二级

相似题推荐

单选题

执行代码x=3if x>5:    print("大")else:    print("小")输出的结果是?( )

A.

 大

B.

 小

C.

 无输出

D.

 报错

2026-07-25
单选题

下列哪个不是 Python 中流程控制的关键字?( )

A.

 if

B.

 elif

C.

 print

D.

 else

2026-07-25
单选题

已知列表s = ["a","b","c"],想要在列表开头插入元素 "z",正确语句是?( )

A.

 s.insert (0,"z")

B.

 s.insert (1,"z")

C.

 s.insert (2,"z")

D.

 s.insert (3,"z")

2026-07-25
单选题

林辰有一个存储歌曲名的列表song。最近他用听歌识曲识别到一首新歌《快乐小马》,想将其添加到列表末尾,下列哪个语句可以实现?( )

A.

 song.insert('《快乐小马》')

B.

 song.append('《快乐小马》')

C.

 song.insert(《快乐小马》)

D.

 song.append(《快乐小马》)

2026-07-25
判断题

当程序执行到break语句时,所有的循环都会中断。( )

A.正确 B.错误
2026-07-25
公众号
客服 反馈
顶部