Guidelines

μ΅œμ†Œκ°’, μ΅œλŒ€κ°’, 총합 κ³„μ‚°ν•˜κΈ°

min, max, sum ν•¨μˆ˜λ“€μ€ 리슀트, νŠœν”Œμ™€ 같은 반볡 κ°€λŠ₯ν•œ 객체에 λŒ€ν•΄ 각각 μ΅œμ†Œκ°’, μ΅œλŒ€κ°’, 총합을 κ³„μ‚°ν•©λ‹ˆλ‹€.


min() ν•¨μˆ˜

min ν•¨μˆ˜λŠ” λ¦¬μŠ€νŠΈμ™€ νŠœν”Œ λ‚΄μ—μ„œ κ°€μž₯ μž‘μ€ 값을 λ°˜ν™˜ν•©λ‹ˆλ‹€.

min ν•¨μˆ˜ μ˜ˆμ‹œ
numbers = [4, 2, 8, 6] min_element = min(numbers) print(min_element) # 2

max() ν•¨μˆ˜

max ν•¨μˆ˜λŠ” λ¦¬μŠ€νŠΈμ™€ νŠœν”Œ λ‚΄μ—μ„œ κ°€μž₯ 큰 값을 λ°˜ν™˜ν•©λ‹ˆλ‹€.

max ν•¨μˆ˜ μ˜ˆμ‹œ
numbers = (4, 2, 8, 6) max_element = max(numbers) print(max_element) # 8

sum() ν•¨μˆ˜

sum ν•¨μˆ˜λŠ” λ¦¬μŠ€νŠΈμ™€ νŠœν”Œ λ‚΄μ˜ λͺ¨λ“  숫자의 합계λ₯Ό λ°˜ν™˜ν•©λ‹ˆλ‹€.

sum ν•¨μˆ˜ μ˜ˆμ‹œ
numbers = [4, 2, 8, 6] sum_of_numbers = sum(numbers) print(sum_of_numbers) # 20
Mission
0 / 1

λ‹€μŒ 쀑 λΉˆμΉΈμ— κ°€μž₯ μ•Œλ§žμ€ ν•¨μˆ˜λŠ” λ¬΄μ—‡μΌκΉŒμš”?

리슀트 λ‚΄ μš”μ†Œμ˜ 총합을 κ³„μ‚°ν•˜λŠ” ν•¨μˆ˜λŠ” μž…λ‹ˆλ‹€.
min
max
sum
len

Guidelines

AI Tutor

Publish

Design

Upload

Notes

Favorites

Help

Code Editor

Run
Generate

Execution Result