
Python - Functions
Authored by Teaching Assistant Ivy
Education
University
Used 54+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a feature of DocString?
Provide a convenient way of associating documentation with Python modules, functions, classes, and methods
All functions should have a docstring
Docstrings can be accessed by the __doc__ attribute on objects
All of the mentioned
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which are the advantages of functions in python?
Reducing duplication of code
Decomposing complex problems into simpler pieces
Improving clarity of the code
All of the mentioned
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the two main types of functions?
Custom function
Built-in function & User defined function
User function
System function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where is function defined?
Module
Class
Another function
All of the mentioned
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is called when a function is defined inside a class?
Module
Class
Another function
Method
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following refers to mathematical function?
sqrt
rhombus
add
rhombus
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
def cube(x):
return x * x * x
x = cube(3)
print (x)
9
3
27
30
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
10 questions
Units & Dimensions
Quiz
•
University
11 questions
[QTEDU] HSK 4 - Buổi 6: 经理对我印象不错 (2)
Quiz
•
University
7 questions
How Well Do You Know Our Leopard Cats?
Quiz
•
KG - Professional Dev...
11 questions
Research Objectives & Research Background
Quiz
•
University
15 questions
PRICING AND ITS OBJECTIVES
Quiz
•
University
9 questions
HUSTer! Rung chuông vàng TOEIC!
Quiz
•
University
16 questions
INVERTER
Quiz
•
University
10 questions
velykos
Quiz
•
University
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