[SOLVED] Shine Getter(python)

My code. my hero won’t move.

    coins = hero.findItems()
    coinIndex = 0

# Wrap this into a loop that iterates over all coins.
while coinIndex < len(coins):
    coin = coins[coinIndex]
    # Gold coins are worth 3.
    x = coin.pos.x
    y = coin.pos.y
    if coin.value == 3:
        # Only pick up gold coins.

oh ok(20characters)…

While True: is written at the top covering the first two lines, but it doesn’t show for some reason.

place coinIndex += 1 in front of the pass

oh and the pass is outside the if loop

did you complete it?

no the coinIndex must be on top like
coinIndex += 1

the first two bars must be in the while true loop

that worked

MOD edit: Solution removed

congrats on passing the level :+1: :+1:

1 Like

do you need anymore help on the next level? (Mad Maxer)

Hi @CocoCharlie here on the discourse we don’t post solutions, the purpose of discourse is to let others learn not simply providing the code, so please delete the solution.
“It doesn’t matter what the result is, what matters is how you achieved the result.” Said a wise man. (The Wise Man I’m referring to is me)

1 Like

change the code(20chars)

I assume his offline


This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.