Skip to content · ⁨Lompat ke konten⁩

Upside-down triangle · ⁨Segitiga terbalik⁩

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.

Bahasa Indonesia

Segitiga terbalik

Cetak empat baris bintang, dimulai dengan empat dan diakhiri dengan satu.

range menghitung mundur dengan langkah negatif: range(3, 0, -1) menghasilkan 3, 2, 1. Ia masih berhenti sebelum angka keduanya, itulah sebabnya nilai stop adalah 0.

Log in or create account · ⁨Masuk atau buat akun⁩

IGCSE, A-Level & AP