-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
770dd06
commit a65f8a4
Showing
2 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class student(): | ||
name = "rakesh" | ||
website ="binarynote.com" | ||
expertise ="PHP, CSS, HTML,JavaScript,JQuery,WordPress and Now Python Django" | ||
|
||
def showMessage(self): | ||
print("This is a demo message from class ") | ||
|
||
s = student() | ||
|
||
print("Default Behaviour of Class Members in Python\n\n\nName : ",s.name) | ||
print("website : ", s.website) | ||
print("Expertise :", s.expertise,"\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
class student(): | ||
class student: | ||
def read_data(self,name,fatherName,stream): | ||
name = self.name; | ||
fatherName = self.fatherName | ||
stream = self.stream | ||
self.name = name | ||
self.fatherName = fatherName | ||
self.stream = stream | ||
|
||
def show_data(self): | ||
print("Student Name ",self.name) | ||
print("father Name ",self.fatherName) | ||
print("Stream Name ",self.stream) | ||
|
||
student s; | ||
s = student() | ||
s.read_data('rakesh','jagdish','computer') | ||
s.show_data() |