I failed because I hurt peasant. Would you please let me know where I do wrong?
Thanks
I failed because I hurt peasant. Would you please let me know where I do wrong?
Thanks
I believe you are using javascript so you need to have var in front of your variable calls
ex.
var enemy1 = "Gort";
var distance1 = hero.distanceTo(enemy1);
hero.say(distance1);
etc. etc.
distance2 is defined in line 9, therefore it is a defined variable and no longer a string. In line 11, you call it in your argument as a string. The same is wrong with line 18 - you’re using a defined variable but calling it in your arguments as a string. In line 7 you did it correctly.
Also, line 14 does nothing. Just delete it.
No, this is Python, not JS.
Problem solved. Thank you for your quick response!