Which of the following is a valid Python function
name?
1function
init
True
Funct1on
When three single quotation marks are used on the
next line directly after defining a function, what does
this indicate?
Multi-line text
A docstring
A string value including double or single quotation marks
None of the above
What are key components of object-oriented
programming in Python? (Choose two.)
Functions that can be performed on a data structure
Attributes that are stored in an object
Configuration templates
YAML files
Which of the following are benefits of OOP?
(Choose all that apply.)
Reusable code
Easy to follow
Low coupling/high cohesion
Complex integration
Which of the following are used to define a class in
Python? (Choose two.)
class classname(parent):
class classname:
def class classname(arg):
None of the above
What is a method?
A variable applied to a class
Syntax notation
A function within a class or an object
Something that is not used in a class
Which of the following describes inheritance?
A hierarchy for functions in Python
Class attributes and methods used as the starting point for another
class
A function only applied to methods being used in another class
None of the above
andrew
(andrew)
#1