Python For Og Lecture 81 - Oop Inheritance Part 1
Python For Og Lecture 81 - Oop Inheritance Part 1
Website - https://petroleumfromscratchin.wordpress.com/
LinkedIn - https://www.linkedin.com/company/petroleum-from-scratch
YouTube - https://www.youtube.com/channel/UC_lT10npISN5V32HDLAklsw
Inheritance
class Reservoir:
def __init__(self, av_por, av_perm, location):
self.porosity = av_por
self.permeability = av_perm
self.location = location
def describe(self):
Saved successfully!
print(f"Porosity: {self.porosity} and Permeability: {self.permeability} md")
def situated(self):
/
print(f"This reservoir is located in {self.location}.")
2/3/2021 Python for O&G Lecture 81: OOP - Inheritance Part 1 - Colaboratory
print(f This reservoir is located in {self.location}. )
res_a.describe()
res_a.situated()
class Tight_reservoir:
self.porosity = av_por
self.permeability = av_perm
self.location = location
self.stimulation = stimul
def describe(self):
print(f"Porosity: {self.porosity} and Permeability: {self.permeability} md")
def situated(self):
print(f"This reservoir is located in {self.location}.")
res_b.situated()
Saved successfully!