from random import randint # Import the random integer generator # from the module random. Target = randint(1,20) # Generate the Integer to be matched. while True: # While ... Guess = randint(1,20) # Attempt to match the target. if Guess == Target: # If the current Guess matches the Target, break # Leave the Loop, Job done! else: # Otherwise, Sadly admit failure,and try again. print("Target (", Target, ") does not match Guess (", Guess, "). \tTry again!") print("Hoorah! Target and Guess both = ", Guess) # When a match is acheived, be happy.