Computer Science 3- Air rescue service

Can someone help me with “Air Rescue Service”. It is a concept challenge.

# To save a friend: say "Friend " followed by the friend's id property.
# To zap an enemy: say "Enemy " followed by the enemy's id property.
while True:
    friend= hero.findNearestFriend()
if friend:
    hero.say("Friend" + friend.id)
enemy = hero.findNearestEnemy()
if enemy:
    hero.say("Enemy" + " " + enemy.id)

1 Like

Try putting the enemy id part before the friend id. And when you say the id of a friend or an enemy, try doing it like this:
Screenshot 2023-04-22 12.14.30 PM

And also did you indent correctly? cause’ when I copied and pasted your code to see what was wrong it wasn’t in the while True loop: