Hello
I’m making a mistake.
He’s attacking but not the others.I tried while True.
Python lvl 30/45
Great,
CloneSnow
Hello
I’m making a mistake.
He’s attacking but not the others.I tried while True.
Python lvl 30/45
Great,
CloneSnow
you are not equipped with glasses. You cannot see very far without them. The code is fine, you just don’t have the correct equipment.
As @MunkeyShynes said, you have not earned the while true:
loop yet. Rework your code so that the code that the while true
loop would normally repeat is in there.
Your code looks absolutely wright for passing the level. Do you have any error message? Is you keyboard at US settings?
hero.attack(enemy3)
# same raw
hero.attack(enemy2)
# same raw
hero.attack(enemy1)
# same raw
experiment with the attacking order
I also need help:
Never understood these levels:
enemy = "Ursa"
hero.attack(enemy) # this works, but WHY?
print(enemy.id) # raises a NULL error as expected
hero.attack("Ursa") # raises an error as expected
This 'feature" can be exploited in many levels, no glaces needed, but why this exists?
in response to your question,
redefines “Ursa” as enemy, so that is why
works but not
It’s because @CloneSnow doesn’t have glasses.