Discussion Thread (W-9): What you learn Today

Number of replies: 45
In reply to First post

Re: Discussion Thread (W-9): What you learn Today

by Abu Salkin -
Inheritance implementation:


class Person:
def __init__(self, fname, lname):
self.firstname = fname
self.lastname = lname

def printname(self):
print(self.firstname, self.lastname)

#Use the Person class to create an object, and then execute the printname method:

x = Person("John", "Doe")
x.printname()
In reply to First post

Re: Discussion Thread (W-9): What you learn Today

by Sazzad Hossain -
Inheritance implementation:


class Person:
def __init__(self, fname, lname):
self.firstname = fname
self.lastname = lname

def printname(self):
print(self.firstname, self.lastname)

#Use the Person class to create an object, and then execute the printname method:

x = Person("John", "Doe")
x.printname()
In reply to First post

Re: Discussion Thread (W-9): What you learn Today

by Nakibul hoque Shohan 192-15-2808 -
Inheritance implementation:


class Person:
def __init__(self, fname, lname):
self.firstname = fname
self.lastname = lname

def printname(self):
print(self.firstname, self.lastname)

#Use the Person class to create an object, and then execute the printname method:

x = Person("John", "Doe")
x.printname()
In reply to First post

Re: Discussion Thread (W-9): What you learn Today

by Jannatul Fardus Armin 192-15-2802 -
Inheritance implementation:


class Person:
def __init__(self, fname, lname):
self.firstname = fname
self.lastname = lname

def printname(self):
print(self.firstname, self.lastname)

#Use the Person class to create an object, and then execute the printname method:

x = Person("John", "Doe")
x.printname(
In reply to First post

Re: Discussion Thread (W-9): What you learn Today

by Al- Maruf 192-15-2821 -
OOP using Python: Inheritance in Python, Design Case Study, Design inheritance based on a real-life problem