Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

38 Kithguard Dungeon has no solution (and what are "arguments"?)


Update: Where my code is
enemy1 = “chunky” # enemy1 now stores "chunky"
enemy1 = hero.findNearestEnemy(“chunky”)
enemy1 = “chunky” # enemy1 now stores "chunky"
The enemy1 = hero.findNearestEnemy(“chunky”) part is red X’d with the "FixYourCode: findNearestEnemy takes no arguments. What does that mean?

There is no possible solution.

enemy1 = hero.findNearestEnemy(“chunky”)

Doesn’t work.

Neither does

chunky = hero.findNearestEnemy()
enemy = hero.findNearestEnemy(“chunky”)
enemy = hero.findNearestEnemy(chunky)
or even enemy1 = “chunky” # enemy1 now stores "chunky"
right bellow enemy =

Nothing changes the variable. If it does, then there is no argument. I don’t even know what an argument is when it never works.

1 Like

First of all, in that level, is there a chunky?


wait, what is the name of the level?

1 Like

It is called “By Any Other Name”. Maybe a previous level has the answer?


Don’t make this too difficult. :slight_smile: The original code is this.

# Change the names of variables to make gems appear!
# Change the name of variable "enemy1" to "chunky".
enemy1 = hero.findNearestEnemy()

# Change the name of variable "enemy2" to "monkey".
enemy2 = hero.findNearestEnemy()

# Collect the gems after changing the variables.

It says, “# Change the name of variable “enemy1” to “chunky”.”

So, everywhere it says “enemy1” change it to say “chunky”.

The point of this level is really just to see that the variable names can be whatever you want. It would work fine for killing ogres as written. Bonus gems show up when you change the variable names,

For your other question. An argument is just the stuff you are passing into a function. For example in the line:


the argument is enemy2, it is the stuff inside the parenthesis.


Thank you. I just went to an earlier level to check on argument. Didn’t realize “enemy1” was already changed from the previous code line.

1 Like