Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PySuper
#python 3.6.9 #PySuper #this code is created by Rezaul Hoque on January 05,2022;contact: jewelmrh@yahoo.com,Dhaka, Bangladesh #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; class Fruit: def __init__(self,fruit, color, price, qty): self.fruit= fruit self.color= color self.price = price self.qty = qty def cost(self): return self.price*self.qty class Mango(Fruit): def __init__(self, fruit,color,price,qty,charge): super().__init__(fruit,color,price,qty) self.charge= charge def cost(self): return super().cost() + self.charge if __name__ == '__main__': m = Mango('Khirsapati','Green',50,1,20) print(m.cost())
run
|
edit
|
history
|
help
0
func mast
hw5 ss while
Интересный Python - Вопрос 1
Lesson3
PRIMES russian DANILIN
montecarlo
24jan py
Eje2_Python_201169275
gj4
Student