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

Upside-down triangle · ⁨역삼각형⁩

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입니다.

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

IGCSE, A-Level & AP