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 for … in.
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.
What’s Happening i am new to this, I stumbled upon this
I’ve discovered It absolutely useful and it has helped me out
loads. I hope to contribute & assist other users like its
aided me. Great job.
Hello there! Do you use Twitter? I’d like to follow you if that would be okay.
I’m absolutely enjoying your blog and look forward
to new posts.
It’s very straightforward to find out any topic on web as compared to books,
as I found this post at this site.
At this time I am going to do my breakfast, when having my breakfast
coming over again to read more news.
It’s amazing to pay a quick visit this site
and reading the views of all colleagues regarding this piece of writing, while I am also zealous of getting know-how.
It’s appropriate time to make a few plans for the long run and it is time to be happy.
I have learn this submit and if I may I want to
counsel you few fascinating issues or suggestions. Perhaps you can write next articles relating to this article.
I desire to learn more issues approximately it!
If you wish for to take a good deal from this
post then you have to apply these techniques to your won web site.
Hmm is anyone else having problems with the images on this blog loading?
I’m trying to find out if its a problem on my end or if it’s the blog.
Any feed-back would be greatly appreciated.
Yesterday, while I was at work, my cousin stole my apple ipad and tested
to see if it can survive a twenty five foot drop, just so she can be a youtube
sensation. My iPad is now destroyed and she has 83 views.
I know this is totally off topic but I had to share it with
someone!
Very nice article, exactly what I wanted to find.
Keep on working, great job!
Right here is the perfect webpage for anybody who wishes
to understand this topic. You know so much its almost hard to argue with you (not that I
personally would want to…HaHa). You certainly put a new spin on a subject that’s been discussed for many
years. Wonderful stuff, just excellent!
you’re in point of fact a just right webmaster. The web site
loading speed is incredible. It sort of feels that you’re doing any unique trick.
Moreover, The contents are masterpiece. you have done a great activity
on this matter!
Fantastic items from you, man. I’ve take note
your stuff previous to and you are just extremely great.
I actually like what you have acquired here,
certainly like what you’re saying and the way by which you say it.
You’re making it enjoyable and you continue to care for to
stay it wise. I can not wait to read far more from you.
That is actually a terrific site.
I’d like to find out more? I’d like to find out more details.
I’m not sure exactly why but this blog is loading extremely slow for me.
Is anyone else having this problem or is it a issue on my end?
I’ll check back later and see if the problem still exists.
Hello everyone, it’s my first pay a quick visit at this web site, and post is truly fruitful for me,
keep up posting these posts.
This is the right site for anyone who wishes to understand this topic.
You realize a whole lot its almost hard to argue with you
(not that I actually will need to…HaHa). You definitely put a brand new spin on a topic which has been written about
for decades. Great stuff, just excellent!
I am regular reader, how are you everybody?
This article posted at this web page is in fact good.
you are in reality a good webmaster. The web site
loading velocity is incredible. It sort of feels that you
are doing any distinctive trick. Also, The contents are masterpiece.
you have performed a great task in this matter!
Nice blog here! Also your web site loads up very fast!
What web host are you using? Can I get your affiliate
link to your host? I wish my web site loaded up as quickly as yours lol
Incredible points. Great arguments. Keep up the
great effort.
Wow, wonderful blog layout! How long have you been blogging
for? you make blogging look easy. The overall look of your web site is
magnificent, let alone the content!
Hi everyone, it’s my first pay a quick visit at this web site, and article is actually fruitful in support of
me, keep up posting these types of articles or reviews.
This article will help the internet viewers for setting up new webpage or even a
blog from start to end.
Have you ever considered creating an e-book or guest authoring on other sites?
I have a blog based on the same subjects you discuss and
would love to have you share some stories/information. I know my audience would appreciate your work.
If you’re even remotely interested, feel free to send
me an e mail.
Fantastic blog! Do you have any tips for aspiring writers?
I’m planning to start my own site soon but I’m a
little lost on everything. Would you propose starting with a free
platform like WordPress or go for a paid option? There are so many choices out there
that I’m totally confused .. Any recommendations? Cheers!
Link exchange is nothing else however it is only placing the other person’s web site link
on your page at suitable place and other person will also
do similar in support of you.
Hello everyone, it’s my first pay a visit at this web site, and paragraph is in fact fruitful in favor of me, keep up
posting these content.
Its like you read my mind! You appear to know a lot about this,
like you wrote the book in it or something. I think that you can do with a few pics to drive the
message home a little bit, but other than that, this is wonderful blog.
A great read. I will definitely be back.
Incredible points. Solid arguments. Keep up the great work.
I go to see every day some web sites and sites to read posts, however this
weblog offers feature based articles.
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 could do with a few pics to drive the message home a little bit, but instead of that,
this is great blog. A fantastic read. I’ll certainly
be back.
Hello would you mind letting me know which webhost you’re working with?
I’ve loaded your blog in 3 completely different web browsers and I must
say this blog loads a lot faster then most. Can you recommend a
good internet hosting provider at a honest price? Kudos,
I appreciate it!
Hello, I enjoy reading all of your article. I like to write a little comment to support you.
Someone essentially lend а hand to make signifіcantly posts
Ι might stаte. Thаt is the ᴠery first timе I frequented үour wweb paցе аnd thus far?
Ι amazed wikth the research you mаɗe to maie tһiѕ particular post incredible.
Wonderful activity!
Ꮇy paɡe – এই বিনামূল্যে পড়ুন
Wow! This blog looks exactly like my old one! It’s on a totally different subject
but it has pretty much the same page layout and design.
Superb choice of colors!
What’s up, I desire to subscribe for this web site to get newest updates, therefore where can i do it
please help.
Someone necessarily help to make critically articles I’d state.
That is the very first time I frequented your web
page and to this point? I surprised with the research you made to make this particular put up incredible.
Wonderful task!
Good article. I’m facing a few of these issues as well..
It’s wonderful that you are getting ideas from
this paragraph as well as from our argument made at
this place.
You can certainly see your skills in the work you
write. The world hopes for even more passionate writers such as you who are not afraid to say how they
believe. At all times go after your heart.
Yes! Finally something about genius.com.
It’s perfect time to make some plans for the long run and it is time to be happy.
I’ve read this submit and if I could I wish to recommend you some attention-grabbing things or suggestions.
Perhaps you could write subsequent articles relating to this article.
I wish to read more issues approximately it!
I am regular visitor, how are you everybody? This piece of
writing posted at this web site is actually nice.
At this time it appears like Expression Engine is the preferred blogging platform available right now.
(from what I’ve read) Is that what you are using
on your blog?
Since the admin of this web site is working, no hesitation very soon it will
be renowned, due to its feature contents.
Hmm it looks like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say, I’m
thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still
new to everything. Do you have any helpful hints for newbie blog
writers? I’d definitely appreciate it.
Hey! Someone in my Facebook group shared this site with us
so I came to check it out. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!
Superb blog and excellent design.
I could not resist commenting. Exceptionally
well written!