Что выполняет данный фрагмент кода?
numList = list(map(int, input().split()))
numList = numList[::2]
print(' '.join(map(str, numList)))
Python списки
Quiz
•
Computers
•
10th Grade
•
Hard
Used 49+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Что выполняет данный фрагмент кода?
numList = list(map(int, input().split()))
numList = numList[::2]
print(' '.join(map(str, numList)))
Вычисляет сумму всех четных элементов списка введенных с клавиатуры
Выводит список всех четных элементов списка введенных с клавиатуры
Выводит в строку все элементы списка введённого с клавиатуры, стоящие на четных местах
Вычисляет длину списка
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Что будет напечатано после выполнения данного фрагмента кода?
a = [1, 2, 3]
a[1] = 3
print(a)
[1, 2, 3]
[1, 3, 3]
3
[3, 2, 3]
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
В результате выполнения кода
a = [0, 1]
b = a
a = [2, 3]
print(b)
Будет напечатано
[2, 3]
[0, 1]
2 3
0 1
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Что будет напечатано после выполнения данного кода:
numList = [1, 2, 3, 4, 5, 6]
numList = [i for i in numList if i % 2 == 0]
print(' '.join(map(str, numList)))
[1, 3, 5]
[2, 4, 6]
1 3 5
2 4 6
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Что будет выведено в результате выполнения данного кода?
numList = [0, 1, 2, 3, -1, -2, -3]
numList = [i for i in numList if i > 0]
print(len(numList))
3
0 1 2 3
[0, 1, 2, 3]
4
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Запустив программу
alist = list(map(int, input().split()))
maxa = max(alist)
print(alist, maxa)
пользователь ввел:
1 2 3 4 5
Что выведет программа?
[1, 2, 3, 4, 5] 5
1 2 3 4 5 5
5
5 [1, 2,3,4,5]
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Дан следующий код:
nlist = [1, 2, 3]
mlist = list(map(lambda i: i**3, nlist))
print(*mlist)
в результате его запуска будет выведено...
1 4 9
3 6 9
1 8 27
[1 4 9]
10 questions
Python - Lists and Elements
Quiz
•
9th - 12th Grade
12 questions
Python list starter
Quiz
•
10th Grade - University
15 questions
Цикл for в python
Quiz
•
10th Grade
15 questions
APCSP Semester 1 Review
Quiz
•
10th Grade
14 questions
Интерфейс Scratch 3.0
Quiz
•
1st - 11th Grade
11 questions
Java ArrayLists
Quiz
•
10th Grade
10 questions
Python Level 2- Lesson 2
Quiz
•
10th Grade
10 questions
Arrays
Quiz
•
10th - 12th Grade
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade
25 questions
Spanish preterite verbs (irregular/changed)
Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance
Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1
Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope
Quiz
•
10th Grade
20 questions
Figurative Language Review
Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes
Quiz
•
9th - 12th Grade