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.

17,247 thoughts on “Contoh Soal Pemrograman – Pola Segitiga Siku-siku

  1. Hmm is anyone else encountering problems with the images on this blog loading?
    I’m trying to figure out if its a problem on my end or if
    it’s the blog. Any feedback would be greatly appreciated.

  2. I’m extremely impressed with your writing skills as well as
    with the layout on your blog. Is this a paid theme or did you customize it yourself?

    Anyway keep up the nice quality writing, it’s rare to see a great blog
    like this one nowadays.

  3. ตรวจดูเปอร์เซ็นต์การแบ่งโบนัสก่อนเล่น วิธีแรกสำหรับในการเล่นสล็อตนั้นไม่ยุ่งยากต่อการติดตามและไม่อยากได้ความเข้าใจมากสักเท่าไรนัก เพียงแค่ตรวจดูเปอร์เซ็นต์ของโบนัส และก็คิดแผนเกมให้รอบคอบ ผลกำไรจะไหลเข้ากระเป๋าคุณมากกว่า 2
    เท่า แนวทางเล่นสล็อตออนไลน์ ทำกำไรโดยไม่ขาดทุน โดยดูจากกรรมวิธีการออกโบนัสหรือหักเปอร์เซ็นต์ของโบนัสสล็อต
    รอคอยรอบการหมุนที่สมบูรณ์แบบเกมสล็อตเป็นเกมที่จำต้องหมุนเพื่อรับโบนัส แล้วก็ของรางวัลต่างๆเยอะแยะ
    และก็เพื่อให้ได้กำไรจากการเล่นสล็อตอย่างสมบูรณ์นั้น คุณจำเป็นต้องเริ่มที่รอบสปินที่เพอร์เฟ็คซะก่อน โดยทั่วไปของเกมสล็อตจะเป็นตัวระบุรอบการหมุนที่สมบูรณ์เหมาะสำหรับความกระตือรือร้น โบนัสกระจายถูกตั้งไว้ที่ 30 รอบการเดิมพัน คุณจะต้องจำไว้ว่าให้หมุนสล็อตมากกว่า 30
    รอบ
    นักบุญจำนวนมากหรือผู้ที่ประสบความสำเร็จสำหรับการเล่นสล็อตมากมาย จะใช้สูตรสล็อต PG แล้วเขาจะหมุนมากยิ่งกว่า 30 รอบ บางครั้งการหมุนครั้งเดียวก็เป็นบวก
    สิ่งจำเป็นอีกประการหนึ่งเป็น สร้างสมดุลงบประมาณกับรอบการหมุนเวียน
    ถ้าเกิดคุณกำลังจะวางเดิมพันอย่างต่ำที่
    10 บาท

  4. I loved as much as you’ll receive carried out right here.
    The sketch is attractive, your authored subject matter stylish.
    nonetheless, you command get bought an edginess over that
    you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a
    lot often inside case you shield this increase.

  5. Very great post. I simply stumbled upon your blog and wished to say that I have truly loved browsing your blog posts. In any case I will be subscribing to your rss feed and I am hoping you write once more very soon!|

  6. Hi there! This is my first visit to your blog! We are a group of volunteers and starting
    a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done a marvellous job!

  7. What you said was very reasonable. However, think about this, suppose you wrote a catchier post title?

    I am not suggesting your content isn’t good, however what if you
    added a title that makes people want more? I mean Contoh Soal
    Pemrograman – Pola Segitiga Siku-siku – Umar faisol is kinda vanilla.
    You ought to look at Yahoo’s front page and watch how they write post titles to grab people to open the links.

    You might add a related video or a picture or two to get people
    interested about what you’ve written. Just my opinion, it could make your
    posts a little bit more interesting.

  8. Howdy! I could have sworn I’ve visited this site before but after going through a few of the
    articles I realized it’s new to me. Anyways, I’m definitely
    delighted I stumbled upon it and I’ll be book-marking it and
    checking back regularly!

  9. Its like you read my mind! You seem to know so much about this,
    like you wrote the book in it or something.

    I think that you can do with some pics to drive
    the message home a little bit, but instead of that, this is excellent blog.

    A great read. I will definitely be back.

  10. Hey there just wanted to give you a quick heads up and let you know a few of the images aren’t loading correctly.
    I’m not sure why but I think its a linking issue.
    I’ve tried it in two different internet browsers and both show
    the same results.

  11. Они являются аналог пневматическим и имеют несколько другие свойства.Для их изготовления используется цельный кусок резины, поэтому они отличаются твердостью. Из минусов цельнолитых шин это процесс монтажа, для которого требуется специальный гидравлический пресс. Но к плюсам можно отметить, что монтаж занимает примерно на 20% меньше времени, чем на штабелёры с пневматической резиной.
    селекторы заказов, которые используются для ручной обработки меньших, чем паллетные количества груза в стеллажах;
    Штабелёры вилочные, ричтраки https://shtabeler.blog/avtopogruzchiki-vilochnye-pogruzchiki/
    Как купить погрузчик вилочный, который оптимально подходит под ваши нужды, удовлетворяет вас по цене? Очень просто – отправьте заявку с сайта – мы отвечаем действительно быстро!
    Безопасность является ключом к успеху, поэтому убедитесь, что вы выбираете бренд с лучшими стандартными функциями безопасности.

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

  12. Your style is unique compared to other people I have read stuff from.
    I appreciate you for posting when you have the opportunity, Guess I’ll just book mark this page.

  13. Hey there, I think your blog might be having browser compatibility issues.
    When I look at your blog in Chrome, it looks fine but when opening in Internet
    Explorer, it has some overlapping. I just
    wanted to give you a quick heads up! Other then that, superb blog!

  14. Howdy! Do you know if they make any plugins to protect against hackers?
    I’m kinda paranoid about losing everything I’ve worked hard
    on. Any recommendations?

  15. Hello, i think that i saw you visited my site thus i came to go back the choose?.I’m trying to
    in finding things to enhance my web site!I assume its ok
    to make use of a few of your ideas!!

  16. you are in point of fact a just right webmaster.
    The site loading velocity is incredible. It seems that you are doing any unique trick.
    Also, The contents are masterpiece. you have performed a
    magnificent activity in this matter!

  17. Admiring the hard work you put into your site and in depth information you present.
    It’s good to come across a blog every once in a while that isn’t the same
    outdated rehashed material. Wonderful read! I’ve bookmarked your site and I’m including your RSS feeds to
    my Google account.

  18. After I originally commented I seem to have clicked the -Notify me when new comments are added- checkbox and from now on whenever a comment is added I receive 4 emails with the exact same comment.
    Is there a means you can remove me from that service? Appreciate it!

  19. I every time emailed this weblog post page to all my associates,
    since if like to read it afterward my links will too.

  20. Having read this I thought it was very enlightening.

    I appreciate you spending some time and effort to put this information together.
    I once again find myself personally spending way too much time both reading and
    leaving comments. But so what, it was still worthwhile!

  21. Hey there this is kinda of off topic but I was wanting to know if blogs use
    WYSIWYG editors or if you have to manually code with HTML.
    I’m starting a blog soon but have no coding know-how so I wanted to get advice from someone with experience.
    Any help would be enormously appreciated!

Comments are closed.