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,220 thoughts on “Contoh Soal Pemrograman – Pola Segitiga Siku-siku

  1. Hi, i think that i saw you visited my blog so i came to go back the
    prefer?.I’m trying to to find issues to enhance my web site!I assume its adequate to use a few of your concepts!!

  2. An intriguing discussion is worth comment. There’s
    no doubt that that you ought to publish more about this subject matter, it may not be a taboo subject but typically people don’t speak about such topics.
    To the next! Kind regards!!

  3. Thank you disposable slippers for house guests, Jewel, the sensible critique.
    Me & my neighbor were just preparing to do a little research on this.
    We got a grab a book from our area library but I think
    I learned more clear from this post. I’m very glad to see such excellent information being shared freely out there.

  4. An interesting discussion is worth comment. I do think that you
    need to write more on this subject, it might not be a taboo subject but usually people don’t discuss
    these topics. To the next! Cheers!!

  5. No matter what window cleaning company you go with, there is a certain level of professionalism and quality of work that you should expect. When you hire a window washer in Peachtree City, you shouldn’t just agree to the first person you meet. Instead, take a look into the company, ask for referrals from friends, and check out the window cleaning company’s portfolio and track record. Once you’ve done this, you can feel confident spending your hard-earned money on the window cleaning services you’re getting. ALAC Services is committed to being the leading service provider for window cleaning, pressure washing, and home services in the Kansas City metropolitan area and adjacent counties in the surrounding Midwest region by providing our customers with quality solutions and exceptional customer service. https://www.weightloseit.com/community/profile/iris83g0607200/ Disclaimer: This website is frequently updated. Some content may be in English until all the content is translated. The service was outstanding, exceptional, reliable, dependable, and extremely professional. Your office was my third attempt to find a good house cleaning service. Roseangela was fantastic. She was punctual, hardworking and did an overall great job. I would recommend her enthusiastically. You can also add our Antiviral Sanitisation service to your domestic cleaning, which eliminates 99% of the germs and viruses in your home! This service is performed by a fully equipped technician who treats your home with lab-tested and CERTIFIED virucides, which have proven effectiveness. 1. The first thing you need to do is add your requirements. Make a list of needs in advance. Even if you’ve had a house cleaner before, now’s the time to evaluate or reevaluate your needs. Perhaps your situation has changed, and you require more or fewer cleanings per month. Perhaps certain rooms need only a quick dusting instead of a full-blown cleaning during each visit. Children and pets might have arrived or departed. Was there something your previous cleaner didn’t do to your liking but didn’t seem worth mentioning? Write it down so you don’t forget to bring it up.

  6. I know this if off topic but I’m looking into starting my own weblog and was wondering what all is required to get setup?
    I’m assuming having a blog like yours would cost
    a pretty penny? I’m not very internet savvy so I’m not 100% positive.

    Any suggestions or advice would be greatly appreciated.
    Thank you

  7. I have to thank you for the efforts you’ve put in penning this site.
    I’m hoping to view the same high-grade content
    by you later on as well. In fact, your creative writing abilities has
    inspired me to get my own site now 😉

  8. We work tirelessly to get the cleanout done fast. Once we’re done, just pay for our services, and we’ll get out of your way. Unlike other estate cleanout companies, Junk Masters prioritizes eco-friendly practices. We reduce waste by donating usable items to a local charity such as Bridging. Then we recycle appliances, electronics, and scraps as appropriate. Once we’ve taken these important steps, then we’ll properly dispose of the remaining items and trash. Cleaning out an entire estate can be extremely stressful. Between the enormous time investment, vast emotional energy, and figuring out what do with all the unwanted items, the process is overwhelming. Unlike other estate cleanout companies, Junk Masters prioritizes eco-friendly practices. We reduce waste by donating usable items to a local charity such as Bridging. Then we recycle appliances, electronics, and scraps as appropriate. Once we’ve taken these important steps, then we’ll properly dispose of the remaining items and trash. https://virectory.com/community/profile/fivfinley181035/ I pay my current housecleaner $70. She works with another woman and I believe they get our small 2 bdrm/1 bath house clean in under 2 hours. I don’t look at it as an hourly rate, but as a ”per house” rate. I don’t care if they take 2 hours or 2 minutes – as long as they get the job done decently. If your housecleaner is like the majority of housecleaners, she’s unlikely to have a full schedule of homes. She’s also probably illegal, has no health insurance, no retirement plan, no car, is sending money to family in another country, and not necessarily ”raking in” $60k or more a year. Working Woman We’re currently paying a flat $150 for a 2 BR/2BA clean every 2 weeks, though I know she charges more to new clients. $30-35 an hour per cleaner for weekly cleaning is about as cheap as you’ll find for good cleaners around here, last I looked; I suspect prices have since gone up due to COVID. Some cleaners can and do charge more. Depending on how messy your teens are, how many stairs you have, and whether you’re having the cleaner tidy as well as clean, run laundry, wash dishes, etc. I’d expect your house would take 4-6 people-hours on a weekly basis.

Comments are closed.