def posIntInput(string):
    """Function to ensure that the input is a positive integer

    Arguments:
        string {str} -- string to print while taking input from user
    """
    while True:
        try:
            while True:
                value = int(input(string))
                if value > 0:
                    break
                else:
                    print("Please enter a positive integer.\n")

            break
        except ValueError:
            print("\nError: That is not an integer")
            print("Press Enter to input the value again.\n")
    return value