Ojo's Python Class 2

Ojo's Python Class 2

Professional Development

15 Qs

quiz-placeholder

Similar activities

Révision HTML, CSS et JavaScript

Révision HTML, CSS et JavaScript

Professional Development

20 Qs

Arrays & Strings using C

Arrays & Strings using C

Professional Development

15 Qs

CSS

CSS

Professional Development

15 Qs

IT (data, viruses and more)

IT (data, viruses and more)

8th Grade - Professional Development

20 Qs

Lógica Python Revisão 1º Semestre

Lógica Python Revisão 1º Semestre

Professional Development

20 Qs

Evaluación de procesos 02

Evaluación de procesos 02

Professional Development

20 Qs

GRAND OPENING INTERNSHIP EXERCISE 2024

GRAND OPENING INTERNSHIP EXERCISE 2024

Professional Development

13 Qs

Evaluacion Continua 02 - Enero 2024

Evaluacion Continua 02 - Enero 2024

Professional Development

16 Qs

Ojo's Python Class 2

Ojo's Python Class 2

Assessment

Quiz

Computers

Professional Development

Practice Problem

Hard

Created by

Ojo Ilesanmi

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A Python module is a file with the _____ file extension that contains valid Python code.

.module

.pymodule

.pym

.py

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To use a module in another module, you must import it using an ________ statement.

import

transfer

from

to

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Suppose a function called add() is defined in a module called adder.py. Which of the following code snippets correctly show how to import and use the add() function? Select all that apply.

import adder

result = adder.add(2, 3)

import add from adder

result = add(2, 3)

from adder import add

result = add(2, 3)

from adder import add

result = adder.add(2, 3)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A package is a folder containing one or more Python modules. One of the modules in a package must be called _______.

__init__.py

__package__.py

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many except statements can a try-except block have?

zero

one

more than one

more than zero

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When will the else part of try-except-else be executed?

always

when an exception occurs

when no exception occurs

when an exception occurs in to except block

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When is the finally block executed?

when there is no exception

when there is an exception

only if some condition that has been specified is satisfied

always

Create a free account and access millions of resources

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?