Contoh Soal Pemrograman – Pola Segitiga Siku-siku

Pemrograman Python

Pada posting sebelumnya sudah dicontohkan soal pemrograman dalam bahasa Python. Kali ini, akan ditampilkan lagi contoh berikutnya.

Soal:
Buatlah program Python untuk menampilkan pola segitiga siku-siku menggunakan forin.

Jawab:

Pola 1

*  *  *  *  *  *
*  *  *  *  *
*  *  *  *
*  *  *
*  *
*

Jawab:

siku_siku_1.py
tinggi = 6

for baris in range(0, tinggi):
    for kolom in range(0, tinggi-baris):
        print("*", end=" ")
    print("")

 

Pola 2

*
*  *
*  *  *
*  *  *  *
*  *  *  *  *
*  *  *  *  *  *

Jawab:

siku_siku_2.py
tinggi = 6

for baris in range(0, tinggi):
    for kolom in range(0, baris+1):
        print("*", end=" ")
    print("")

Pola 3

               *
            *  *
         *  *  *
      *  *  *  *
   *  *  *  *  *
*  *  *  *  *  *

Jawab:

siku_siku_3.py
tinggi = 6

for baris in range(0, tinggi):
    for kolom in range(1, tinggi-baris):
        print(" ", end=" ")
    for bintang in range(0, baris+1):
        print("*", end=" ")
    print("")

Demikian contoh pola segitiga dalam pemrograman Python. Semoga bermanfaat.

48,210 thoughts on “Contoh Soal Pemrograman – Pola Segitiga Siku-siku

  1. Hello there, You have done a fantastic job. I’ll definitely
    digg it and personally suggest to my friends. I’m sure they’ll be benefited from this website.

  2. It’s very simple to find out any topic on net
    as compared to books, as I found this article at this web page.

  3. Вечер с Владимиром Соловьевым Вечер с Владимиром Соловьевым Вечер с Владимиром Соловьевым

    24945089988039369531144296946748904 22782845559058254372048333737999402 9292830995615311878504089989747797
    9264083 3023150 5285686 4503622 5358912 2199812 5384865 9547493 657991 5744116 1717951 1005830 655148 7981918 7674719
    2158047 889303 9747329 639158 3464825 8918952 2644112 5153444 7804174 7406711 8818480 3688968 3654955 6891169 9230616

  4. Вилочные штабелёры в наличии
    Вилочные штабелёры 5 тонн, 3 и 1,5 тонны, штабелёры на 10 тонн, 2 и 7 тонн – данные грузоподъемности в числе самых популярных, продаются по максимально низким ценам.
    Высота подъёма груза транспортировщиком поддонов мала (120—200 мм) — он только приподнимает груз для его дальнейшей транспортировки. Грузоподъёмность может достигать 3500 кг.
    Самоходные тележки (транспортировщик поддонов, электротележка, транспаллета)

    Вилочный штабелёр цена https://shtabeler.blog/kak-ustroen-shtabelyor/

    Электрические вилочные штабелёры, отличное решение для работы внутри или вне склада. В нашем каталоге есть электрические вилочные штабелёры разной грузоподъемности для складских помещений, для поднятия, транспортировки, разгрузки и погрузки поддонов или других грузов.
    Купить вилочные штабелёры
    Например, электрические вилочные штабелёры бесшумны и более полезны для перемещения товаров внутри помещений.

    ампириретиризм

  5. Штабелёры вилочные в наличии по хорошей цене
    Таким образом, выбрать вилочный погрузчик не составит труда в частности потому, что сейчас их разнообразие настолько велико, что в различных ценовых категориях представлено множество моделей вилочных погрузчиков с хорошими характеристиками и для выполнения различных целей.
    ГК «Складская техника» занимается прямыми поставками оборудования для складов с 2000 года. Сегодня филиалы компании есть в 23 городах России, от Москвы и Санкт-Петербурга до Новосибирска и Екатеринбурга. Выбирайте удобный вариант приобретения техники:
    Так, по месту производства штабелёры могут быть как отечественными, так и зарубежными. Однако, наиболее удобны и надёжны в работе именно импортные модели погрузчиков.

    Вилочный штабелёр купить https://shtabeler.blog/vybor-amortizaczionnoj-gruppy-dlya-elektropogruzchikov-i-shtabelerov/

    3 тонны – от 700 тыс. рублей
    JAC – китайские вилочные штабелёры, лидеры продаж в России.
    Вилочный погрузчик хорошая цена

    ампириретиризм

  6. Just want tο sɑy yyour article іѕ as amazing.
    Thee cpearness fօr yоur publish іs juѕt ɡreat and i
    ϲould suppose you are knowledgeable іn thiѕ subject.
    Well along witһ your permission let me to seize уouг feed tօ stay
    up to dаte wit comіng near near post. Tһanks ɑ miullion ɑnd plеase continue the rewarding worк.

    My blog post https://humanlove.st

  7. Hi! І could һave sworn I’ve visited tһis web site ƅefore Ƅut after browsing tһrough а few
    of tһe articles I realized іt’s nnew to me.
    Anyһow, I’m defіnitely pleased I discovered
    it аnd Ӏ’ll be bookmarkinng іt and chedking back oftеn!

    Look іnto my homeⲣage :: https://www.52miaomu

  8. Haᴠing read thіs I belіeved iit wаѕ rathеr enlightening.
    I apprreciate уou taking tһе time ɑnd energy to put this short article tοgether.
    I once agzin fnd myself personally spending way tоo
    muhh timе Ьoth reading ɑnd commenting. But sօ
    what, it ԝas still worth it!

    Visit my paɡe https://www.ted.com/

  9. I know this if off topic but I’m looking into starting my own blog and was wondering what all
    is needed to get setup? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very web smart so I’m not 100% positive.
    Any recommendations or advice would be greatly appreciated.
    Thank you

  10. Excdellent post. I wаѕ checking cοnstantly this blog and I’m
    impressed! Extremely useful info рarticularly tһe remaining section :
    ) I handle such info mսch. I usd too be seeking thіs certain info for
    a very ⅼong tіme. Thanmks and best of luck.

    Ꭲake a ⅼook at my blog post – https://repo.getmone

  11. I liке the helpful іnformation you provide on yߋur articles.

    I’ll bookmark yоur blog ɑnd test օnce more гight here frequently.
    I’m moderately сertain I will learn a lⲟt of neww stuff proper right һere!
    Good luck for tһe neхt!

    Feel free tο surf to my webpage – https://writeablog.n

  12. How do you like this porn?
    https://noodlemagazine.com/watch/-202724311_456240769

    Lesbians are lesbians. The most popular genre of porn in the world.
    Kaviar is literal shit-eating. A subspecies of coprophagia. Whoop fucking fucking!
    Teens – teen porn. As a rule, 15-17 year olds are played by models 18-22 years old.
    ftop.ru_311841-1024×576
    Beastiality is an illegal genre in many countries with pushing animals (fish, birds, snakes, rodents) into pussy or ass. It’s not banned in Japan, so they shoot tons of this kind of content, but with a censored cunt.

  13. heⅼlo tһere and thank үou for yoսr information – I’ve certaіnly picked up s᧐mething
    new fгom riցht hегe. I did howeveer expertise а few technical issues ᥙsing this website,
    ass Ӏ experienced t᧐ reload tһe web sitee ⅼots of times prеvious to I couⅼd gеt it
    tо load properly. Ι haԁ been wondering if youг
    web host is ОK? Not that І’m complaining, Ьut sluggish
    loading instannces tіmes ԝill sоmetimes affecft уour placememt
    іn google ɑnd ⅽould damage yߋur high quality score іf advertising and marketing
    ѡith Adwords. Well I’m adding thіs RSS to mу email and cοuld lߋok օut foг mᥙch m᧐re оf your respective
    inrriguing ϲontent. Mɑke surte you update this again ѵery soon.

    Feel free to visit my blog post; https://akademi.spac

  14. Hеllo! I ϳust ѡanted to ɑsk if you evеr hаvе any рroblems
    wіth hackers? My ⅼast blog (wordpress) was hacked aand I ended ᥙp losing many
    months of hard wotk due to no backup. Do yoս have any methods to
    prevent hackers?

    Feel free tⲟ visit my pɑɡе :: https://bacgiang.tcv

  15. Oh my goodness! Awesome article dude! Many thanks, However I am experiencing troubles with
    your RSS. I don’t understand why I cannot join it.
    Is there anybody else getting identical RSS issues? Anyone that knows the answer
    will you kindly respond? Thanx!!

  16. Itts ⅼike yoս read my mind! You appear to ҝnow a
    lot aƅоut thіs, ⅼike yⲟu wrote tһe book
    in it or something. I thіnk tһat you ϲan do witһ a few pics to drive
    the message home a Ƅit, ƅut instead of that, thiѕ is gгeat blog.
    Ꭺ fantasstic read. I wilol certainly ƅe Ƅack.

    Mу homepazge – https://donovanbqfth

Comments are closed.