File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Object Oriented Programming Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ Contributions are always welcome!!!!
2
+ If you want to contribute to this repository follow the below procedure -
3
+ 1. Fork this repository
4
+ 2. Clone the code to your local system and go through readme.md
5
+ 3. You can create another branch to add further commits
6
+
7
+ GIT COMMANDS FOR CONTRIBUTING -
8
+ 1. To clone this repository
9
+ `git clone [code link]`
10
+ 2.To create new branch
11
+ `git checkout -b [branch name] `
12
+ 3. To stage files
13
+ `git add .`
14
+ 4.To commit changes
15
+ `git commit -m "commit message"`
16
+ 5. To push changes
17
+ `git push [remote branch] [new branch]`
18
+
19
+
Original file line number Diff line number Diff line change
1
+ #Today we will learn how to create a class and other attributes of class
2
+ #Below is the method how classes are defined
3
+ class Student :
4
+ pass
5
+
6
+ #Below is the method to create object , Here Varun and rohan are two objects of Class Student
7
+ Varun = Student ()
8
+ larry = Student ()
9
+
10
+ # Now after creating objects we can use them to call variables
11
+ Varun .name = "Harry"
12
+ Varun .std = 12
13
+ Varun .section = 1
14
+ larry .std = 9
15
+ larry .subjects = ["hindi" , "physics" ]
16
+ print (Varun .section , larry .subjects )
17
+
18
+
19
+
20
+
You can’t perform that action at this time.
0 commit comments