Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #3
- class Smartphone():
- def __init__(self, tamanho, interface):
- self.tamanho = tamanho
- self.interface = interface
- class MP3Player(Smartphone):
- def __init__(self, tamanho, interface, capacidade):
- Smartphone.__init__(self, tamanho, interface)
- self.capacidade = capacidade
- def especif(self):
- return "Tamanho: {}, Interface: {}, Capacidade: {}".format(self.tamanho, self.interface, self.capacidade)
- p3 = MP3Player(123, "android", 1024)
- print(p3.especif())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement