OOP with Python - Intro to OOP
Quiz
•
Computers
•
12th Grade
•
Medium
Alexandra Hemming
Used 15+ times
FREE Resource
Enhance your content in a minute
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Encapsulation is a software design practice of bundling data and the methods that operate on that data.
Answer explanation
Encapsulation is one of the 3 pillars of object-oriented programming.
The other two are:
- Inheritance
- Polymorphism
We will look at both these concepts later.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Object and Class are different terms describing the same concept.
Answer explanation
Object - an entity that holds data as attributes and is of a class.
Class - a blueprint for an object.
In the image above we can see an example of the relationship.
Dog is a class that defines a blueprint of data and functionality.
Bobby is an object or instance created from the Dog class.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Attributes encode the state of an object and are represented by variables.
Answer explanation
Attribute - any object value.
In the example the object Bobby has five attributes:
- Yellow
- Brown
- 17 in
- 35 in
- 24 pounds
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Methods encode the behaviour of an object and are represented by functions.
Answer explanation
Method - a "callable attribute" defined in a class and can be called by an object.
In the example the object Dag has four methods:
- Sit
- Lay Down
- Shake
- Come
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A programming language can be either object-oriented or procedural, but NOT both.
Answer explanation
Python can be BOTH procedural and object-oriented.
A large number of programming languages can use both and are known as multi-paradigm languages.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Object is an abstract template describing the general states and behaviours.
Answer explanation
Object - an entity that holds data as attributes and is of a class.
Class - a blueprint or an abstract template describing the general states and behaviours for an object.
In the image above we can see an example of the relationship.
Dog is a class that defines a blueprint of data and functionality.
Bobby is an object or instance created from the Dog class.
Similar Resources on Wayground
10 questions
Cyber Security Quiz
Quiz
•
12th Grade
10 questions
Intro to Binary - Concepts
Quiz
•
6th Grade - University
10 questions
C++ quiz
Quiz
•
10th Grade - Professi...
10 questions
Quiz 8 (01.09.2021)
Quiz
•
1st - 12th Grade
10 questions
AP CSA - Inheritance, plus one while loop.
Quiz
•
12th Grade
10 questions
CAMBRIDGE - A Level -IT- Networks - Satellite Communications
Quiz
•
12th Grade - Professi...
10 questions
Notes on Blender: Section 16B
Quiz
•
6th Grade - University
10 questions
Excel Intro
Quiz
•
7th - 12th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
