def find_val_percent(minval, maxval, x):
    """Find the percentage of a value, x, between a min and max number.
    minval -- The low number of the range.
    maxval -- The high number of the range.
    x -- A value between the min and max value."""
    if not minval < x < maxval:
        print("\n" + "    ERROR: X must be between minval and maxval.")
        print("    Defaulting to 50 percent because why not Zoidberg. (\/)ಠ,,,ಠ(\/)" + "\n")
    
    return (x - minval) / (maxval - minval) * 100