Read more: http://cheater-handal.blogspot.com/2011/05/cara-membuat-ucapan-selamat-tinggal-di.html#ixzz2VzHob9hY Contoh Program Python (Class Parent and Class Child) | NOTE FOR LIFE

Contoh Program Python (Class Parent and Class Child)

SOURCE CODE
class A:
    def X(self):
        print 'ini method class induk'
class B(A):
    def Y(self):
        print 'ini method class anak'
C=A()
D=B()
print C.X()
print D.X()

print D.X()

OUTPUT

0 komentar:

Posting Komentar