You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def __init__(self, ejercito: dict):
self.ejercito = ejercito
def armar_ejercito(self):
print("***Hora de armar tu ejercito***")
puntaje = 0
for i in self.ejercito:
a = int(input(f"Cuántos {i}: "))
puntaje = puntaje + (a * self.ejercito[i])
return puntaje
`
class Batalla:
bondandosas = {
"Pelosos": 1,
"Sureños buenos": 2,
"Enanos": 3,
"Númenóreanos": 4,
"Elfos": 5,
}
malvadas = {"Sureños malos": 1, "Orcos": 2, "Goblins": 3, "Huargos": 4, "Trolls": 5}
ejercito_bondadoso = Batalla(bondandosas)
puntaje_bondadoso = ejercito_bondadoso.armar_ejercito()
ejercito_malvado = Batalla(malvadas)
puntaje_malvado = ejercito_malvado.armar_ejercito()
print("" * 20)
print("Inicia la batalla")
print("" * 20)
if puntaje_bondadoso > puntaje_malvado:
print("Gana el ejercito bondadoso")
elif puntaje_malvado > puntaje_bondadoso:
print("Gana el ejercito malvado")
else:
print("HA SIDO UN EMPATE")
`
The text was updated successfully, but these errors were encountered: