def cheat(num):
    """View the answer to a problem."""
    # Define solution before echoing in case solution does not exist
    solution = click.style(Problem(num).solution, bold=True)
    click.confirm("View answer to problem %i?" % num, abort=True)
    click.echo("The answer to problem {} is {}.".format(num, solution))
View the answer to a problem.