Preguntas sobre programación en Python
¿clase? Héroe (objeto):
def? __init__(self):
Auto. héroe = 'héroe'
self. HP=100
¿definición? ataque(self):
Imprimir("El héroe está atacando normalmente")
¿Clase? Héroe físico(héroe):
def? ataque(self):
print("El héroe está realizando un ataque físico")
a = héroe(). ataque()
b=PhysicalHero(). ataque()