Search Header Logo

Работа с последовательностью в Python

Authored by Sofya Bur

Computers

University

Used 1+ times

Работа с последовательностью в Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Длину объекта какой структуры данных можно узнать с помощью ф-ии len()?

массив

кортеж

строка

все варианты верны

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Что выведет код?

a = ["q", "w", "e"]

b = a

b[0] = "r"

print(a)

["q", "w", "e"]

['r', 'w', 'e']

ошибка

3.

FILL IN THE BLANK QUESTION

1 min • 5 pts

Какой символ нужно поставить вместо $, чтобы код скомпилировался?

print($'В слове "Hello" ровно {len("Hello")} символов.')

4.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Что выдаст код?

a = ["q"]

b = ("w", "e")

print(a + b)

["q", "w", "e"]

("q", "w", "e")

[["q"], ("w", "e")]

Ошибка

5.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Что выдаст код?

a = ['q', 'w', 'e']

print(not 'q' in a)

True

False

Ошибка

6.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Что выдаст код?

a = ('q', 'w', 'e')  

b = ['r']             

c = b + list(a)       

d = tuple(b) + a                                                        

print(type(c), type(d))

<class 'list'> <class 'tuple'>

<class 'tuple'> <class 'list'>

<class 'list'> <class 'list'>

<class 'tuple'> <class 'tuple'>

Ошибка

7.

MULTIPLE CHOICE QUESTION

45 sec • 5 pts

Media Image

Что выдаст код?

1

3

5

1

ничего

ошибка

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?