Skip to content

Instantly share code, notes, and snippets.

@dirumahrafif
Created June 3, 2022 01:09
Show Gist options
  • Select an option

  • Save dirumahrafif/ad5053fe0ec8593bdc30dc0a0bc8f035 to your computer and use it in GitHub Desktop.

Select an option

Save dirumahrafif/ad5053fe0ec8593bdc30dc0a0bc8f035 to your computer and use it in GitHub Desktop.
Cara membuat piramid sederhana di python
import time
baris = int(input("masukkan tinggi piramid:"))
spasi = baris - 1
for a in range(baris):
kali = 2*a+1
for j in range(spasi):
print(end=" ")
spasi = spasi - 1
time.sleep(1)
for c in range(kali):
print("*",end="")
print("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment