Para diversificar fiz o jogo em inglês e inclui um criador de numeros randomicos utilizando a lib random
import random
print(34*"'")
print("| Welcome to the Guessing Game | ")
print(34*"'")
# Criando e selecionando o numero secreto de forma randomica
secret_number = random.randrange(1, 50)
total_try = 5
print("What is the secret number?")
for tentativa in range(1, total_try + 1):
print(f"Round {tentativa} of {total_try} rounds")
chute_str = input("Choose a number between 1 and 50?")
chute = int(chute_str)
if(chute < 1 or chute > 50):
print("Invalid, you must to choose a number between 1 and 50. Unfurtunately you lost a choice")
continue
if(chute == secret_number):
print("Amazing! You got it right")
break
else:
if(chute > secret_number and tentativa < 5):
print("Too bad, but you were wrong. The secret number is smaller.")
elif(chute < secret_number and tentativa < 5):
print("Too bad, but you were wrong. The secret number is bigger.")
elif(chute > secret_number or chute < secret_number and total_try >= 5):
print("Sorry, but you were wrong. The game is over.")