import random
target_num, guess_num = random.randint(1, 5), 0

while target_num != guess_num:
    guess_num = int(input('Guess a number between 1 and 5: '))
    print('Wrong guess. Try again!')
while target_num == guess_num:
    guess_num = int(input('Guess a number between 1 and 5: '))
    print('Congratulations! You guessed the number correctly')

