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

What is an object in Python?

View

Which keyword is used to define a class in Python?

View

How do you create an instance of a class named Car?

View

What does the __init__ method do?

View

What is the default return value of a method that doesn’t specify a return statement?

View

Which keyword is used to access the current object inside a class?

View

Which of the following is an example of attribute in Python?

View

How do you call a method from an instance named car of a class Vehicle?

View

Which of the following methods will print the string representation of an object?

View

How do you delete an object in Python?

View

What is an object in Python?

A template for creating classes
A collection of functions
An instance of a class
A collection of data only

Which keyword is used to define a class in Python?

object
def
class
self

How do you create an instance of a class named Car?

Car()
new Car()
Car.create()
Car.construct()

What does the __init__ method do?

Initializes the class name
Creates a class object
Acts as a constructor to initialize attributes
Deletes an object

What is the default return value of a method that doesn’t specify a return statement?

None
0
False
Null

Which keyword is used to access the current object inside a class?

self
this
cls
object

Which of the following is an example of attribute in Python?

def name()
self.name
if name:
print(name)

How do you call a method from an instance named car of a class Vehicle?

Vehicle.method(car)
car.Vehicle.method()
car.method()
Vehicle.method()

Which of the following methods will print the string representation of an object?

__init__()
__str__()
__call__()
__repr__()

How do you delete an object in Python?

del()
remove()
del object
delete()