
G11 Unit 2 Exercises
Authored by Razan Alghamdi undefined
Computers
11th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The composition of attributes and methods is defined by
Inheritance
Method
Class
Object
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement is true about the inheritance concept in object-oriented programming?
A child class can inherit attributes and methods from multiple parent classes.
Child classes cannot have additional attributes or methods beyond those of the parent
A parent class can inherit from its child class.
Only methods can be inherited from the parent class.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code and identify the parent class.
class A:
pass
class B(A):
pass
class C(A):
pass
A
B
C
None
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In Python, what is an example of polymorphism?
Creating classes that inherit from multiple parent classes.
Creating multiple classes with the same name.
Using the len() method on different data types.
Writing multiple functions with different names that perform the same action.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output of the following program.
class Parent:
def speak(self):
return "Parent Speaking"
class Child(Parent):
def speak(self):
return "Child Speaking"
obj = Child()
print(obj.speak())
Child Speaking
An error will be raised
None of the above
Parent Speaking
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will happen if a method is not found in the Child class but is present in the parent class?
The program will throw an error.
The method from the parent class will be executed.
The program will terminate.
The method from the child class will be executed.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which feature of OOP allows the reusability of code?
Inheritance
Class
Method
Object
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
20 questions
แบบทดสอบปลายภาคโปรแกรมแอนิเมชัน
Quiz
•
9th - 12th Grade
17 questions
Data Structures: 1D,2D & List
Quiz
•
11th Grade
12 questions
Spreadsheet
Quiz
•
5th - 11th Grade
20 questions
HISTORY OF COMPUTER_SUMMATIVE 1
Quiz
•
11th - 12th Grade
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
20 questions
Ujian Akhir Semester Genap Teknik Animasi 2D 3D Kelas XI
Quiz
•
11th Grade
20 questions
Quiz
•
7th - 12th Grade
13 questions
Five Nights At Freddy's: Security Breach Quiz
Quiz
•
KG - Professional Dev...
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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