# [SOLVED] Mined Gems (python)

``````# Collect 4 gems. Don't touch gems from the inner circle.

# The radius of the gem-trap circle.

# This function check that a is definitely greater than b.
def definitelyGreater(a, b):
return a > b + 0.5

gems = hero.findItems()

# Iterate all gems:
for gem in gems:
# Use definitelyGreater to check if a gem's distance
# is greater than the inner radius:
hero.move(gem.pos)
hero.moveXY(40, 34)
``````

my hero just stands there doing nothing

Two things:

1. What are you expecting to be returned here?
``````return a > b + 0.5
``````
1. Whatâ€™s the difference between
``````def definitelyGreater(a, b)
``````

and

``````if (definitelyGreater >
``````
1 Like

what do you mean?(20chars)

Change this

``````# Collect 4 gems. Don't touch gems from the inner circle.

# The radius of the gem-trap circle.

# This function check that a is definitely greater than b.
def definitelyGreater(a, b):
return a > b + 0.5

gems = hero.findItems()

# Iterate all gems:
for gem in gems:
# Use definitelyGreater to check if a gem's distance
# is greater than the inner radius:
hero.move(gem.pos)
hero.moveXY(40, 34)
``````

into this

``````# Collect 4 gems. Don't touch gems from the inner circle.

# The radius of the gem-trap circle.

# This function check that a is definitely greater than b.
def definitelyGreater(a, b):
return a > b + 0.5

gems = hero.findItems()

# Iterate all gems:
for gem in gems:
# Use definitelyGreater to check if a gem's distance
# is greater than the inner radius:
hero.move(gem.pos)
hero.moveXY(40, 34)
``````

You need to enter the parameters for any input function. if you use definitelyGreater, it will give you nothing (0). So, it will not work

Can you please delete the working code and leave only this because some people could use it to â€ścheatâ€ť at the level?

Andrei

1 Like

sorry(20 chaaaaaaaars)

Is that ok now?(20 chars)

anyways what should i do

yep itâ€™s ok(20chars)

you want to input something into your function when you are using it

sorry i donâ€™t understand

definitelyGreater function need two inputs. (def definitelyGreater (a, b))

the function is check if a is (way) bigger than b

Itâ€™s very late in my time zone/11:15p.m. so bye

oh ok bye (20chars).

can anybody help me iâ€™m still stuck