When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!
If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer!
Here is the link to the problem I’m dealing with: https://www.codecademy.com/paths/computer-science/tracks/cspath-cumulative-tourism/modules/cspath-boredless-tourist/projects/the-boredless-tourist
I keep getting an “UnboundLocalError” and I don’t know how to fix the code
def find_attractions(destination, interests):
destination_index = get_destination_index(destination)
attractions_in_city = attractions[destination_index]
for attractions in attractions_in_city:
possible_attraction = attraction
attraction_tags = attraction
for intrest in intrests: if interest in attraction_tags: attractions_with_interest.append(possible_attraction)
la_arts = find_attractions(“Los Angeles, USA”, [‘art’])