Search Header Logo

Вопросы по Python

Authored by Oksana O

Education

8th Grade

Used 2+ times

Вопросы по Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Что делает цикл for в Python?

Выполняет код один раз

Выполняет код несколько раз, пока выполняется условие

Перебирает элементы последовательности

Выполняет код бесконечно

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какая из строк правильно создаёт цикл for?

for x in 10:

for x in range(10):

for (x = 0; x < 10; x++):

for x to 10:

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Что вернёт range(5)?

[0, 1, 2, 3, 4]

[1, 2, 3, 4, 5]

[5, 4, 3, 2, 1]

[0, 1, 2, 3, 4, 5]

4.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Какой код напечатает числа от 1 до 5?

for i in range(5): print(i)

for i in range(1, 6): print(i)

for i in range(0, 5): print(i + 1)

Все вышеперечисленные

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Как называется переменная, которая перебирается в цикле `for`?

Итератор

Генератор

Счётчик

Объект

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой результат будет у следующего кода? for i in range(3): print(i)

0 1 2

1 2 3

0 1 2 3

Ошибка

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Что выведет следующий код? for i in range(2, 10, 3): print(i)

2 5 8

2 4 6 8

2 3 4 5 6 7 8 9

Ошибка

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?