Add up to five · 5까지 더하기
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
This one builds on a lesson you haven't finished yet. Do that lesson first: · 이 과제는 아직 완료하지 않은 수업에 기반합니다. 먼저 해당 수업을 완료하세요:
Python Basics · While loops →
English
Add up to five
Use a while loop to add 1 + 2 + 3 + 4 + 5 into total. total should end as 15.
Two things change every time round: the running total, and the counter n. Miss the counter and the loop never ends; miss the total and it ends with nothing in it.
한국어
5까지 더하기
while 루프를 사용하여 1 + 2 + 3 + 4 + 5을 total에 더하세요. total의 최종 값은 15이어야 합니다.
매 순환마다 두 가지가 변경됩니다: 누적 합계 total와 카운터 n입니다. 카운터를 누락하면 루프가 끝나지 않으며, 총계를 누락하면 비어 있는 상태로 끝납니다.
Use a while loop to add 1 + 2 + 3 + 4 + 5 into total. total should end as 15. · while 루프를 사용하여 1 + 2 + 3 + 4 + 5을 total에 더하세요. total의 최종 값은 15이어야 합니다.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.