Search Header Logo

питон 4

Authored by кек .

English

Professional Development

Used 2+ times

питон 4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

46 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the not keyword in Python?

Reverses the result of a boolean expression.

Compares two values

Assigns a value to a variable

Ends a loop.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of print(type([1, 2, 3]))?

<class 'list'>

<class 'tuple'>

<class 'set'>

<class 'dict'>

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function can you use to iterate over both keys and values of a dictionary?

items()

keys()

values()

iterate()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output? print(10 / 4)

2.5

2

Error

3

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following represents a valid Python module?

A .py file containing Python code.

A .txt file containing text.

A .exe file containing executable code.

A .csv file containing comma-separated values

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you handle multiple exceptions in a single try block?

Use multiple except clauses

Use a try block for each exception

Write all exceptions on one line separated by semicolons.

Use the finally clause

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following will check if a string starts with a specific prefix?

startswith()

endswith()

checkprefix()

beginwith()

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?