Skip to content · ⁨본문 바로가기⁩

Sum a list · ⁨列表 합계하기⁩

English

Sum a list

Add up every number in a list and return the total. Start a running total at 0, then loop over the list and add each value to it.

This pattern — a running total that grows inside a loop — comes up everywhere in programming.

한국어

리스트 합계 구하기

리스트의 모든 수를 더해서 총합을 반환합니다. 누적 합계를 0로 시작하고, 리스트를 순회하며 각 값을 더하세요.

이 패턴 — 루프 내에서 커지는 누적 합계 — 은 프로그래밍에서 어디나 나타납니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP