Dork's port

Pyhon Class 테스트 본문

Develop

Pyhon Class 테스트

Dork94 2020. 7. 16. 14:50
class Baby:
    def __init__(self):
        print('Born!')

    def screaming(self):
        print('YAAAAAAA@@@@')

class Adult(Baby):
    def __init__(self):
        super().__init__()
        print('Hey~')

    def smoking(self):
        print('- ~~~~~~@@@@@')

class Old(Adult):
    def __init__(self):
        super().__init__()

        print('DDak DDak')

    def rest(self):
        print('Peace....')



if __name__=='__main__':

    hanbin = Old()
    hanbin.screaming()
    hanbin.smoking()
    hanbin.rest()


Comments