Beginner help. Why is my counter not counting past 2?

When i run the code and i answer wrong(on purpose) multiple times, the counter only goes to 2 and does not go any higher.

Any help greatly appreciated.

guess = int(input("Guess a number from 0 to 10: ")) counter = 1

while counter != 10: if guess == random_number : print("Guess #" , counter+1) print("Correct! You finished in" , counter+1 , "attempt(s)!")

    break

elif guess != random_number:
    print("Incorrect try again. \nGuess # " , counter+1)
    guess = int(input("Guess a random number from 0 to 10: "))