
Python Functions and Modules Quiz

Quiz
•
Computers
•
University
•
Medium
Krishndeo Pawar
Used 1+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What keyword is used to define a function in Python?
func
def
function
define
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is NOT a type of function parameter in Python?
Keyword arguments
Default arguments
Static arguments
Variable-length arguments
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the purpose of the return statement in a function?
To return result from the function
To call another function
To print output
To define parameters
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following modules is used for mathematical functions in Python?
datetime
random
os
math
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the lambda keyword create in Python?
Static methods
Named functions
Global variables
Anonymous functions
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following is a valid way to import a module in Python?
load module_name
require module_name
include module_name
import module_name
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code: print(sum(10, 20)) if sum is defined as def sum(a, b): return a + b?
10
Error
20
30
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
PYTHON PROGRAMMING Q4 FUNCTIONS

Quiz
•
University
20 questions
PYTHON FUNCTION

Quiz
•
University
25 questions
Introduction to Python

Quiz
•
KG - University
20 questions
2. Ayo Main Quiz Lagi

Quiz
•
University - Professi...
20 questions
Artificial Intelligence

Quiz
•
University
20 questions
Ch.8 - Introducing Python

Quiz
•
6th Grade - Professio...
25 questions
Workshop Quiz

Quiz
•
University
20 questions
ASK T2 - Kod Arahan (Python)

Quiz
•
7th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University