0% found this document useful (0 votes)
3 views3 pages

Assignment Python Question.docx

The document contains a series of questions related to Python programming, specifically focusing on classes and object-oriented programming concepts. It is divided into basic and intermediate-level questions, covering topics such as class definitions, object creation, inheritance, and encapsulation. Each question prompts for an explanation or definition of key terms and methods used in Python.

Uploaded by

Alex Any
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Assignment Python Question.docx

The document contains a series of questions related to Python programming, specifically focusing on classes and object-oriented programming concepts. It is divided into basic and intermediate-level questions, covering topics such as class definitions, object creation, inheritance, and encapsulation. Each question prompts for an explanation or definition of key terms and methods used in Python.

Uploaded by

Alex Any
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

✅ Basic-Level Questions

1.​ Q: What is a class in Python?​

2.​ Q: How do you define a class in Python?


3.​ Q: What is the difference between a class and an object?​
A:

4.​ Q: What is the __init__() method?​

5.​ Q: How do you create an object from a class?​


A:

✅ Intermediate-Level Questions
6.​ Q: What is self in Python class methods?​
A:.

7.​ Q: What is a class variable vs an instance variable?​


A:

8.​ Q: What are class methods and static methods?​


A:

9.​ Q: Can you make variables private in Python?.

10.​Q: Can a class inherit from another class in Python?​


🔹 Basic-Level Questions
11.​Q: What is an object in Python?​
A:​

12.​Q: How do you create an object in Python?​


A:​

13.​Q: What is the difference between a class and an object in Python?​


A:
1.​ .

14.​Q: What is the __init__() method in Python?​


A:​

15.​Q: How can you access object attributes in Python?​


A:

🔹 Intermediate-Level Questions

16.​Q: What is the use of self in Python classes?.

17.​Q: Can you modify an object’s attribute after it is created?​


A:​

18.​Q: What is object identity in Python? How do you check it?​


A:​

19.​Q: What is the difference between is and ==?​

20.​Q: What are magic methods or dunder methods in Python objects?​


A:​
🔹 Basic-Level Questions
21.​Q: What is Object-Oriented Programming?​
A:​

22.​Q: What are the main OOP principles in Python?​


A:

23.​Q: How does Python support OOP?​


A:.

24.​Q: What is a class and an object in Python?​


A:

25.​Q: How is encapsulation implemented in Python?​


A:​

🔹 Intermediate-Level Questions
26.​Q: What is inheritance in Python?​
A:​

27.​Q: What is method overriding?​


A:​

28.​Q: What is polymorphism? Give an example.​


A:​

29.​Q: What is abstraction in Python?​


A:

30.​ Q: What is multiple inheritance in Python?​


A:​

You might also like