Q15. What is an abstract class in Python?
Anonymous Quiz
63%
A class that cannot be instantiated
25%
A class with only private methods
3%
A class with only public methods
8%
A class with no methods
Q16. How do you define an abstract class in Python?
Anonymous Quiz
9%
By using the abstract keyword
7%
By using the abstract class statement
84%
By importing the abc module and using@abstractmethod decorator
0%
By using the virtual keyword
Q17. What is an interface in Python?
Anonymous Quiz
10%
A class that cannot be inherited
72%
A blueprint of a class without any implementation
7%
A class with only private methods
11%
A class with only public methods
Q18. Which OOP principle allows a class to have multiple methods with the same name but different parameters?
Anonymous Quiz
11%
Inheritance
75%
Polymorphism
10%
Encapsulation
3%
Abstraction
Q20. What is the purpose of the init method in Python classes?
Anonymous Quiz
16%
To define private attributes
8%
To define public attributes
76%
To initialize object state
0%
To delete an object
Q21. Which keyword is used to define a method in a Python class?
Anonymous Quiz
14%
method
75%
def
2%
define
9%
function
Q22. What does the self keyword represent in Python class methods?
Anonymous Quiz
5%
It represents the superclass
6%
It represents the subclass
68%
It represents the current object instance
21%
It represents the class itself
Q23. What does the str method do in Python?
Anonymous Quiz
71%
Converts an object to a string
17%
Converts a string to an object
8%
Compares two objects
5%
Initializes an object
Q24. Which method is called when an object is deleted?
Anonymous Quiz
17%
delete
14%
remove
65%
del
4%
destroy
Q25. What does the isinstance() function do in Python?
Anonymous Quiz
62%
Checks if an object is an instance of a specific class
25%
Checks if an object is a subclass of a specific class
5%
Checks if two objects are equal
8%
Checks if two objects are the same instance
Q26. What does the issubclass() function do in Python?
Anonymous Quiz
27%
Checks if an object is an instance of a specific class
63%
Checks if an object is a subclass of a specific class
6%
Checks if two objects are equal
3%
Checks if two objects are the same instance
Q27. What is the purpose of the @staticmethod decorator in Python?
Anonymous Quiz
52%
To create a static method that can access class attributes
9%
To create a method that can access instance attributes
9%
To create a class method that can access instance attributes
30%
To create a method that can access both class and instance attributes
👍1
Q28. What is the purpose of the @classmethod decorator in Python?
Anonymous Quiz
13%
To create a static method that can access class attributes
17%
To create a method that can access instance attributes
47%
To create a class method that can access class attributes
24%
To create a method that can access both class and instance attributes
👍1
Q29. What does the super ( ) function do in Python?
Anonymous Quiz
72%
Calls the superclasss method
18%
Calls the subclasss method
8%
Creates a new object
3%
Deletes an object
👍2
Q30. What does the term method resolution order (MRO) refer to in Python?
Anonymous Quiz
25%
The order in which methods are defined in a class
22%
The order in which methods are called in a class
44%
The order in which multiple inheritance searches for a method
9%
The order in which classes are defined in a module
👍1
أسئلة في مادة شبكات الحاسوب#شبكات_الحاسوب
#computer_network
د. #عبدالرحمن_الصبري - نظري
SOON✨
👇👇
طبعاً الأسئلة بتكون بطريقة مختلفة، يعني بتكون من بنك الأسئلة حق الدكتور، ولكن بالإضافة إلى شرح للسؤال في قسم التعليقات تحت كل سؤال.
#علم_البيانات الدفـعـ(1)ــة
👍2
أولاً:
Chapter 2
#شبكات_الحاسوب
#computer_network
د. #عبدالرحمن_الصبري - نظري
#علم_البيانات الدفـعـ(1)ــة
1. The ....... layer adds a header to the packet coming from the upper layer that includes the logical addresses of the sender and receiver.
Anonymous Quiz
24%
A) data link
56%
B) network
14%
C) physical
6%
D) none of the above
2. Which of the following is an application layer service?
Anonymous Quiz
15%
A) File transfer and access
14%
B) Mail service
6%
C) Remote log-in
65%
D) All the above
3. When data are transmitted from device A to device B, the header from A’s layer 4 is read by B’s ___ layer.
Anonymous Quiz
63%
A) Transport
12%
B) Application
12%
C) Physical
13%
D) None of the above