[SOLVED] Can't solve Sarven Shepherd

That is because you currently have an infinite loop. Remember that your second while loop is looking for a condition. In this instance it is whether or not:

enemyIndex < len(enemies) # if number in enemyIndex is less than the count of enemies

Your enemyIndex starts at Zero which is less than the length of enemies (or count of enemies in a general sense), at what point in your code do you increase your enemyIndex to eventually go through all of the enemies? Your enemyIndex helps you walk through all the enemies in the array (enemies) to compare each one at a time. If you need more help, below is another post that covers the topic a little more.

2 Likes