
Ojo's Python Class 2
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Hard
Ojo Ilesanmi
Used 1+ times
FREE Resource
Enhance your content in a minute
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)
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Introduction to PHP
Quiz
•
Professional Development
10 questions
FP2: 01 - MODULOS
Quiz
•
Professional Development
20 questions
Salesforce Developer
Quiz
•
Professional Development
15 questions
Kodlama ve Bilişim
Quiz
•
Professional Development
18 questions
Ict Quiz
Quiz
•
KG - Professional Dev...
20 questions
Introduction to Machine Learning
Quiz
•
University - Professi...
10 questions
Java Strings
Quiz
•
1st Grade - Professio...
10 questions
CodeMonkey
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
