A list of squares · 제곱수 리스트
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 · Lists (1-D arrays) →
English
A list of squares
Build a list one item at a time instead of printing each value.
squares.append(x) adds x to the end of the list. Printing a whole list shows it in square brackets, with commas between the items.
한국어
제곱수 리스트 만들기
매번 값을 출력하는 대신 리스트를 항목별로 만들어보십시오.
squares.append(x)은 x을 리스트末尾에 추가합니다. 전체 리스트를 인쇄하면 대괄호 안에 쉼표로 구분된 형태로 표시됩니다.
Start with an empty list, add the squares of 1 to 5 with .append(), then print the list. It should show [1, 4, 9, 16, 25]. · 빈 리스트로 시작하여 1부터 5까지의 제곱수를 .append()으로 추가한 후 리스트를 출력합니다. 결과로 [1, 4, 9, 16, 25]이 표시되어야 합니다.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.