Python - Functions

Quiz
•
Education
•
University
•
Medium
Teaching Assistant Ivy
Used 53+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Review 3rd grade

Quiz
•
3rd Grade - University
8 questions
4 Python

Quiz
•
University
10 questions
Unity 1 ДЛЯ ВСЕХ

Quiz
•
7th Grade - University
13 questions
UNIT 1&2 : CELL INJURY & ADAPTATION - INFLAMATION & REPAIRS-

Quiz
•
University
10 questions
Chapter 3 Fuel and Exhaust Systems (Part 1)

Quiz
•
University
10 questions
Embellishing Tones

Quiz
•
University
10 questions
Module 1-Flow Control_5th_Semseter

Quiz
•
University
10 questions
Basic Python

Quiz
•
10th 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 Education
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