Timber guard (what variable)


#1

Continuing the discussion from Pythonic python – looping over lists:

(this is my code)
what variable should i use then???
kind regards,
J Hall


#2

How on earth do people still manage to use block quotes? sigh. Place your code between triple backticks (`), in order for it to format properly.

What do you mean, what variable should you use? You’re looking for coins, right? And coins are items, yes? Therefore, what variable do you use in gold = self.findNearest( x ), where x is the variable?

Hint: Read only if you're stuck

You’ve already defined the variable in question.


#4


What is the problem?


#5

In the middle of the screen are the methods. Click on the one next to your boots called, move(targetPos) and the example will show you exactly what is wrong with line 21. Just be aware that the example shows the usage as an argument, so the parenthesis are not going to work in your code.