Upside-down triangle · 역삼각형
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 · Counting loops →
English
Upside-down triangle
Print four rows of stars, starting with four and ending with one.
range counts backwards with a negative step: range(3, 0, -1) gives 3, 2, 1. It still stops before its second number, which is why the stop value is 0.
한국어
역삼각형
네 줄의 별을 출력하되, 네 개로 시작하여 하나로 끝내십시오.
range은 음수 스텝으로 뒤로 세는 데 사용됩니다: range(3, 0, -1)은 3, 2, 1을 생성합니다. 여전히 두 번째 수 전에 멈추므로, 멈춤 값은 0입니다.
Print a triangle of stars that shrinks: ****, then ***, then **, then *. · 별 삼각형을 줄마다 줄여나가는 형태로 출력합니다: 먼저 ****, 다음 ***, 다음 **, 마지막 *.
Click Run to see the output here. · 출력을 보려면 '실행'을 클릭하세요.