Search Header Logo

Week 6 上周知识点回顾

Authored by Nila Zhang

Information Technology (IT)

University

Used 2+ times

Week 6 上周知识点回顾
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

如何在字符串中表示一个反斜杠?

\

/

\\

\/

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下哪个是格式化字符串的正确用法?

'他叫{name},今年{age}岁'.format(name='小明', age=18)

'他叫{name},今年{age}岁'.format(name='小明')

'他叫{name},今年{age}岁'.format(age=18)

'他叫{name},今年{age}岁'.format()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

以下哪个方法可以删除字符串两侧的空白字符?

join()

split()

replace()

strip()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

在Python中,字符串对象是可变的吗?

不确定

部分可变

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

使用哪个方法可以将列表中的元素连接成字符串?

split()

strip()

replace()

join()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

在Python中,如何打开一个文件进行写入?

open('file.txt', 'r+')

open('file.txt', 'a')

open('file.txt', 'r')

open('file.txt', 'w')

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

在Python中,如何将字符串分割成列表?

split()

combine()

join()

partition()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?