Continuing the discussion from Pythonic python – looping over lists:
(this is my code)
what variable should i use then???
kind regards,
J Hall
Continuing the discussion from Pythonic python – looping over lists:
(this is my code)
what variable should i use then???
kind regards,
J Hall
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?
You’ve already defined the variable in question.
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.