#!
/bin/python3
import math
import os
import random
import re
import sys
class parent:
def __init__(self,total_asset):
self.total_asset = total_asset
def display(self):
print("Total Asset Worth is "+str(self.total_asset)+" Million.")
print("Share of Parents is "+str(round(self.total_asset/2,2))+" Million.")
# It is expected to create two child classes 'son' & 'daughter' for the above class
'parent'
class son(parent):
def __init__(self,total_asset,ps):
parent.__init__(self,total_asset)
self.ps=ps
def son_display(self):
x=(self.total_asset*self.ps)/100
print("Share of Son is "+str(round(x,2))+" Million.")
class daughter(parent):
def __init__(self,total_asset,ps):
parent.__init__(self,total_asset)
self.ps=ps
def daughter_display(self):
x=(self.total_asset*self.ps)/100
print("Share of Daughter is "+str(round(x,2))+" Million.")
if __name__ == '__main__':