I cant get this code to work. I've looked around and cant find anything that will help but every time i run it i get an error
print('Now for part 2 of the guessing game!') print('I am thinking of a fruit but you need to guess which one!') fruit = ['Grape', 'Blueberry', 'Banana', 'Cherry', 'Peach', 'Lemon', 'Strawberry', 'Lime', 'Plum', 'Honeydew', 'Nectarine', 'Blackberry', 'Watermelon', 'Cantalope', 'Raspberry', 'Dragonfruit'] secretFruit = random.choice(fruit) for tries in range(1, 5): print('Please guess a fruit') fruitGuess = str(input()) if fruitGuess == secretFruit: print('Wow you nailed it! You, '+name+' are a natural psychic!') elif tries == 1: print('You have 4 tries left! Guess again') elif tries == 2: print('Thats two tries down, three to go!') elif tries == 3: print('Well thats three. I hope your last two guesses are better than your first three!') elif tries == 4: print('You have one guess left! Make it count') elif tries == 5: print('Im sorry, the fruit in my head was '+secretFruit+'. Better luck next time!') else: print('Im sorry, the fuit was '+secretFruit+'. Better luck next time!')