I'm new to programming, so sorry for the stupid qustion. I'm trying to program a simple guessing game in python and so far it works quite well. The only problem I have is, that if you guess the correct number on your last try, the programm isn't printing the "congrats" command but only the "The Game is Over" command. I'm grateful for any help!
from random import randint
x = randint(1, 20)
print(x)
count = int(0)
t = str(4 - count)
print("Guessing Game! You have 5 tries to guess a number between 1 and 20!")
n = int(input("Enter your number: "))
while count <= 3:
if n < x:
print(f"{n} is smaller. You have {t} tries left")
elif n > x:
print(f"{n} is greater. You have {t} tries left")
else:
print("Congrats. You guessed the correct number")
break
count += 1
t = str(4 - count)
n = int(input("Enter your number: "))
print("The Game ist Over!")