Строки python

Строки python

12th Grade

15 Qs

Student preview

quiz-placeholder

Similar activities

программирование

программирование

9th Grade - University

19 Qs

Mastering Python String Techniques

Mastering Python String Techniques

9th - 12th Grade

10 Qs

Unity скрипты по Runner 3

Unity скрипты по Runner 3

9th - 12th Grade

11 Qs

Кортежи в программировании

Кортежи в программировании

12th Grade

18 Qs

Python 1

Python 1

1st Grade - University

17 Qs

String

String

10th - 12th Grade

10 Qs

Unity 10 урок

Unity 10 урок

KG - Professional Development

10 Qs

ASK T2 - Kod Arahan (Python)

ASK T2 - Kod Arahan (Python)

7th Grade - University

20 Qs

Строки python

Строки python

Assessment

Quiz

Created by

HI, Guy

Computers

12th Grade

2 plays

Hard

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Как создать пустую строку в Python?

empty_string = " "

empty_string = ' '

empty_string = str()

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

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Как получить длину строки в Python?

length = len(my_string)

length = string_length(my_string)

length = count(my_string)

length = count(my_string)

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Как объединить две строки в Python?

result = str1 - str2

result = str1 + str2

result = concat(str1, str2)

result = join(str1, str2)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Как проверить, содержит ли строка подстроку в Python?

substring in my_string

my_string.contains(substring)

contains(substring, my_string)

my_string.isSubstring(substring)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Как заменить все вхождения подстроки в строке в Python?

new_string = replace(substring, replacement, my_string)

new_string = my_string.replace(substring, replacement)

new_string = substitute(substring, replacement, my_string)

new_string = my_string.sub(substring, replacement)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Как преобразовать строку в верхний регистр в Python?

new_string = to_upper(my_string)

new_string = my_string.upper()

new_string = convert_case(my_string, 'upper')

new_string = case_upper(my_string)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Как удалить лишние пробелы в начале и конце строки в Python?

trimmed_string = trim(my_string)

trimmed_string = my_string.remove_whitespace()

trimmed_string = my_string.strip()

trimmed_string = strip_whitespace(my_string)

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?