def is_triangular(k):
    """
    k, a positive integer
    returns True if k is triangular and False if not
    """
    n = 1
    total = 0
    while total <= k:
        # print(total, n)
        if total == k:
            return True
        total += n
        n += 1
    return False