Instructions

  • 1. Your final score will reflect your grasp of the concepts—approach each question with precision.
  • 2. Thoroughly review each solution before proceeding to ensure full understanding.
  • 3. Final results will be available after submission to provide insights into areas for further improvement.
  • 4. Maintain academic integrity—plagiarism undermines learning and professional growth.
  • 5. Once submitted, responses are final, so ensure you’re confident in your answers.
  • 6. These challenges are designed to test practical knowledge; apply your skills as you would in real-world scenarios.

All Problems

Question

Action

Which of the following is an instance of a class?

View

How do you create multiple objects from the same class?

View

What is the difference between a class and an instance?

View

Which of the following statements is correct?

View

Which method is called when an object is deleted?

View

What will print(student1 is student2) return if both are created separately from the Student class?

View

What type of method is shared across all instances?

View

What is the output of type(student1)?

View

If self is omitted in a method, what happens?

View

Which function returns the memory address of an object?

View

Which of the following is an instance of a class?

Class definition
Object
Method
Attribute

How do you create multiple objects from the same class?

Use the same class name with different attributes
Reuse the constructor
Call the class multiple times
Declare each class object with new keyword

What is the difference between a class and an instance?

A class is a template, while an instance is a specific object
An instance contains methods but not attributes
Class and instance are identical in Python
An instance cannot have attributes

Which of the following statements is correct?

Each object shares the same state as the class
Each object has its own copy of class attributes
Class attributes are defined within instances
Each instance method is shared by all objects

Which method is called when an object is deleted?

__del__()
__delete__()
delete()
__end__()

What will print(student1 is student2) return if both are created separately from the Student class?

True
False
Error
None

What type of method is shared across all instances?

Instance method
Class method
Static method
Private method

What is the output of type(student1)?

class 'Student'
object 'Student'
<class '__main__.Student'>
None

If self is omitted in a method, what happens?

Python will raise an error
The method becomes static
The method cannot access attributes
It will still work, but behave differently

Which function returns the memory address of an object?

address()
id()
location()
ref()