Help With Blind Distance [Solved]

Hi There Guys,

I am currently stuck on Blind Distance, i am not necessarily looking for answers but wanting help tips and solutions.
Here is my code

# Tell the wizard the distance to the coming ogres.

# This function finds the nearest enemy and returns the distance to it.
# If there is no enemy, the function returns 0.
def nearestEnemyDistance():
    enemy = hero.findNearestEnemy()
    result = 0
    if enemy:
        result = hero.distanceTo(enemy)
    return result

while True:
    # Call nearestEnemyDistance() and
    # save the result in the variable enemyDistance.
    enemyDistance = nearestEnemyDistance()
    # If the enemyDistance is greater than 0: 
    ***if enemy.distance is > = 0*** 
        # Say the value of enemyDistance variable.
        enemy.distance

where i have put asterixs on one line is where i think i need help most

Thanks Antoni

u dont need to > = 0 it says greater than 0 not greater than or equal to 0

and say the enemy distance using hero.say(enemyDistance)

2 Likes

thank you very much, have liked u

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