# \[수학] 기초 통계 - 합계 / 평균 / 최댓값 / 최솟값

### 코드

{% code title="리스트의 합계를 구할 때" %}

```
@수학 (리스트)의 합계/총합
```

{% endcode %}

{% code title="리스트의 평균 구할 때" %}

```
@수학 (리스트)의 평균
```

{% endcode %}

{% code title="리스트에서 최댓값을 구할 때" %}

```
@수학 (리스트)중/에서 최댓값/최대값
```

{% endcode %}

{% code title="리스트에서 최솟값을 구할 때" %}

```
@수학 (리스트)중/에서 최솟값/최소값
```

{% endcode %}

***

### 설명

리스트에서 합계 / 평균 / 최댓값 / 최솟값을 구해 반환합니다.

***

### 주의사항

* 수학 코드를 쓸 때는 앞에 `@수학`을 써야 해요.

***

### 파이썬 대응 코드

```
sum(list)
sum(list) / len(list)
max(list)
min(list)
```

***

### 예시

{% code title="예시 코드" %}

```
# 합계
@수학 [1, 2, 3, 4, 5]의 합계 보여주기
@수학 [2, 4, 6, 8, 10]의 총합 보여주기

# 평균
@수학 [2, 4, 6, 8, 10]의 평균 보여주기

# 최댓값/최솟값
@수학 [1, 5, 3, 9, 2]중 최댓값 보여주기
@수학 [1, 5, 3, 9, 2]에서 최솟값 보여주기
```

{% endcode %}

{% code title="예시 코드의 결과" %}

```
15  # [1, 2, 3, 4, 5]의 합계
30  # [2, 4, 6, 8, 10]의 총합
6   # [2, 4, 6, 8, 10]의 평균
9   # [1, 5, 3, 9, 2]중 최댓값
1   # [1, 5, 3, 9, 2]에서 최솟값
```

{% endcode %}

***

### 검색 키워드

수학, 통계, 합계, 총합, 평균, 최댓값, 최솟값, 최대값, 최소값


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codebook.horang.it/math/undefined-6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
