def progress_bar(current, total):
    """
    Calculate progress of task.\n
    Takes two args: `current` - current value and `total` - total values, then
    calculates percentage. A progress bar is subsequently formed.
    """

    percent = (current/total)
    bar_len = 50
    bar = f"[{'#'*int(percent*bar_len)}{' '*(bar_len-int(percent*bar_len))}] {int(percent*100)}%"

    return bar