Дана строка
s = "автомобиль"
С помощью среза получите новую строку q, в которой будет слово "авто".
Пробелы в ответе не ставьте
Строки в Python. Первое знакомство
Quiz
•
Computers
•
10th Grade
•
Hard
Ольга Перескокова
Used 19+ times
FREE Resource
10 questions
Show all answers
1.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Дана строка
s = "автомобиль"
С помощью среза получите новую строку q, в которой будет слово "авто".
Пробелы в ответе не ставьте
2.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Дана строка s = "гипербола".
Какие команды нужно написать, чтобы получить слово "перо"
print(s[2:5] + s[6])
t = s[2:-2]
print(t[:3] + t[4])
t = s[2:-2]
print(t[:3] + t[6])
print(s[2:5] + s[7])
3.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
Дана строка s = "еле-еле едет".
Что будет выведено командой
print(s.count('e'))
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Какой метод позволяет найти самое левое вхождение подстроки substr в строке str?
str.find(substr)
substr.find(str)
str.rfind(substr)
substr.rfind(str)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Какой метод позволяет найти самое правое вхождение подстроки substr в строке str?
str.find(substr)
substr.find(str)
str.rfind(substr)
substr.rfind(str)
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Дана строка s. Как с помощью среза получить последние два символа этой строки? В ответе пробелы не ставьте.
7.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Дана строка s = "перо".
Как можно сформировать новую строку q, в которой будет слово "опер"?
q = s[4]+s[1]+s[2]+s[3]
q = s[3]+s[:3]
q = s[-1]+s[-2::-1][::-1]
q = s[len(s)] + s[:-1:-1]
15 questions
Intro to Java Loops
Quiz
•
9th - 12th Grade
15 questions
Python Lists
Quiz
•
10th - 12th Grade
8 questions
Podstawy pythona
Quiz
•
7th - 12th Grade
12 questions
Basic Python and Console Interaction - Mod3
Quiz
•
10th Grade
10 questions
Unit 1 Post Test: Basic Python
Quiz
•
9th - 12th Grade
10 questions
Python User Input Quiz
Quiz
•
6th Grade - University
10 questions
Java Code Tracing Practice A
Quiz
•
9th - 12th Grade
12 questions
Python Print Statement
Quiz
•
6th - 10th Grade
25 questions
Equations of Circles
Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)
Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System
Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice
Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers
Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons
Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)
Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review
Quiz
•
10th Grade