def get_data_points_per_line(session: Session) -> int:
    while True:
        data_points_per_line = get_integer_from_user(session, 'How many data points per line should be outputted: ')
        if data_points_per_line <= 0:
            session.get_io().output('Your input must be greater than zero, instead got {}'.format(str(data_points_per_line)))
            time.sleep(1)
            session.clear()
            continue
        return data_points_per_line
def retrieve_data_point_count(session: Session) -> int:
    while True:
        data_point_count = get_integer_from_user(session, 'How many data points do you want to create: ')
        if data_point_count <= 0:
            session.get_io().output('Your input must be greater than zero, instead got {}'.format(str(data_point_count)))
            time.sleep(1)
            session.clear()
            continue
        return data_point_count
def get_number_off_largest(session: Session) -> int:
    while True:
        num_off_largest = get_integer_from_user(
            session, 'For finding the nth largest element, n is: ')
        if num_off_largest <= 0:
            session.get_io().output(
                'Your input must be greater than zero, instead got {}'.format(
                    str(num_off_largest)))
            time.sleep(1)
            session.clear()
            continue
        return num_off_largest
def retrieve_max_data_value(session: Session) -> int:
    return get_integer_from_user(session, 'What should the maximum data value be: ')
def get_data_to_try_to_sum(session: Session) -> int:
    return get_integer_from_user(session, 'What number should we try to find data points summing to: ')
Exemplo n.º 6
0
def get_data_to_append(session: Session) -> int:
    return get_integer_from_user(session,
                                 'What data point should be appended: ')
Exemplo n.º 7
0
def get_data_to_try_to_sum(session: Session) -> int:
    return get_integer_from_user(
        session, 'What number should we try to find data points summing to: ')
Exemplo n.º 8
0
def get_data_to_remove(session: Session) -> int:
    return get_integer_from_user(session,
                                 'What data point should be removed: ')
def get_data_to_append(session: Session) -> int:
    return get_integer_from_user(session, 'What data point should be appended: ')
def get_data_to_remove(session: Session) -> int:
    return get_integer_from_user(session, 'What data point should be removed: ')