<jupyter_start><jupyter_text>최댓값 찾기<jupyter_code>def max_find(arr):
    s = 0
    for i in arr:
        if s < i:
            s = i
        else:
            s = s
            
    return s
max_find([1,9,3,4])
### 답
def find_max(a):
    n = len(a)
    max_v = a[0]
    for i in range(1, n):
        if a[i] > max_v:
            max_v = a[i]
    return max_v
v = [17, 92, 18, 33, 58, 7, 33, 42]
find_max(v)
max_find(v)<jupyter_output><empty_output><jupyter_text>최댓값의 위치 구하기<jupyter_code>def find_loc_max(a):
    max_v = find_max(a)
    result = 0
    for idx, value in enumerate(a):
        if value == max_v:
            result = idx
    return result
        
find_loc_max(v)
#### 답
def find_max_idx(a):
    n = len(a)
    max_idx = 0
    for i in range(1, n):
        if a[i] > a[max_idx]:
            max_idx = i
    return max_idx
find_max_idx(v)<jupyter_output><empty_output><jupyter_text>연습문제- 숫자 n개를 리스트로 입력받아 최솟값을 구하는 프로그램을 만들어 보세요.<jupyter_code>def min_find(a):
    s = a[0]
    for i in range(1, len(a)):
#         print(a[i])
        if s > a[i]:
            s = a[i]
            
    return s
min_find(v)<jupyter_output>92
18
33
58
7
33
42
{'fraction_non_alphanumeric': 0.12771503040834056, 'fraction_numerical': 0.03475238922675934, 'mean_word_length': 2.0157068062827226, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '329322', 'license': 'CC-BY-3.0', 'n_tokens_mistral': 561, 'n_tokens_neox': 572, 'n_words': 122, 'path': 'algorithm/algo_2.ipynb', 'repo_name': 'sung429/Python', 'size': '1151'}