Here is this guessing game. I would like the player to try 2 times if he failed the game must stop.

```
import random
def guess(x):
random_number = random.randint(1, x)
guess = 0
while guess != random_number:
guess = int(input(f"Guess a number between 1 and {x}: "))
if guess < random_number:
print("Sorry, guess again. Too low.")
elif guess > random_number:
print("Sorry, Too high.")
print(f"Yay, congrats. You have guessed the number {random_number} correctly!!")
```

guess(10)