Search Header Logo

Python. If/else/elif

Authored by Вера Разумова

Information Technology (IT)

9th - 12th Grade

Used 1+ times

Python. If/else/elif
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 • 1 pt

Какой синтаксис if оператора в Python является правильным?

if x == 10 then:

if (x == 10) then:

if x = 10:

if x == 10:

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Что выведет следующий код, если x = 5?

Greater than 5

Equal to 5

Less than 5

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Что из перечисленного НЕЛЬЗЯ использовать в условии if?

Операторы сравнения (==, >, <)

Логические операторы (and, or)

Операторы присваивания (=)

  • Булевы выражения (True, False)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Оператор else является необязательным при использовании операторов if и elif.

Верно

Неверно

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Оператор elif обязателен, если используется else.

Верно

Неверно

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Оператор if в Python может содержать несколько условий, используя логические операторы, такие как and и or.

Верно

Неверно

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Какой будет вывод следующего кода?

Both conditions are True

x is less than or equal to 5

y is greater than or equal to 30

Error

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?