Skip to content

Commit 4024b4a

Browse files
add oops concepts
1 parent eabf986 commit 4024b4a

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

14_OOPS/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Object-Oriented Programming (OOP) in Python
22

3-
Object-Oriented Programming (OOP) is a programming paradigm that organizes code into objects that contain both **data (attributes)** and **behavior (methods)**. Python is an object-oriented programming language that allows developers to implement OOP concepts effectively.
3+
Object-Oriented Programming (OOPS) is a programming paradigm that organizes code into objects that contain both **data (attributes)** and **behavior (methods)**. Python is an object-oriented programming language that allows developers to implement OOP concepts effectively.
44

55
## Key OOP Concepts in Python
66

14_OOPS/intro.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# class Student: # this is a Object
2+
# name = "Dhrubaraj"
3+
# age = 18
4+
#
5+
# s1 = Student() #this is a Class
6+
# print(s1.name)
7+
# print(s1.age)
8+
9+
10+
#init function
11+
12+
class Student:
13+
name = "Dhrubaraj"
14+
def __init__(self): # ya jo constactor he ya apne ap call ho jata he
15+
print("this is a init function")
16+
17+
s1 = Student() #new object ko hi self bolte he

0 commit comments

Comments
 (0)