class Team():
def setTeam(self, team):
self.team = team
def showTeam(self):
print(self.team)
class tipe_Hero():
def setTipe(self, tipe):
self.tipe = tipe
def showTipe(self):
print(self.tipe)
class Hero(Team, tipe_Hero):
def __init__(self, name, health):
self.name = name
self.health = health
archer = Hero("archer", 100)
archer.setTeam("merah")
archer.setTipe("panah")
archer.showTeam()
archer.showTipe()
Tidak ada komentar:
Posting Komentar