As part of my course at university I am learning python a task I have been trying to (re)write this guess the number game to terminate if the user fails to guess correctly within 5 tries:

```
    # Guess My Number Mod 5 tries or bust

import random  

print("\nI'm thinking of a number between 1 and 100.")
print("Try to guess it in five tries or less")

my_number = random.randint(1, 100)
guess = int(input("Go on, Take a guess, I dare ya "))
tries = 1

while guess != my_number:
    if guess > my_number:
        print("Lower...")
    else:
        print("Higher...")
guess = int(input("Go on, Take a guess, I dare ya "))
tries += 1
if tries==5:
        input("You failed to guess the number was it that hard?\n Press any key to exit!)"

print("Well done you guessed correctly!The number was", my_number)
print("And it only took you", tries, "tries!\n")

input("\n\nPress the enter key to exit.")

```

I assume the termination cause isn't working as my if statement is outside the while loop and I can't get it to take effect.

Also some invalid syntax as I'm tired and can't spot it.

If possible can you guys give me hints on how to fix what I want to do as I am more likely to learn that way.