[SOLVED] No output in classes
Hi, The code isn't showing any output. Can someone tell me the reason- #!/usr/bin/python # python program for items and its two child classes perishable and non perishable class Items(object): def __init__(self,price): self.price = price def CalculateSalePrice(self): pass class Perishable(Items): def __init__(self,price): self.price = price def CalculateSalePrice(price): print('The price is:',(price+500)) class NonPerishable(Items): def __init__(self,price): self.price = price def CalculateSalePrice(price): print('The price is:',(price+(price * 0.1))) i = Items(10) i.CalculateSalePrice() i.CalculateSalePrice() Thanks