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.
Thanks for every other fantastic article. Where else may
anyone get that type of info in such a perfect way of writing?
I’ve a presentation subsequent week, and I am on the look for
such information.
This is very interesting, You’re a very skilled blogger.
I’ve joined your rss feed and look forward to seeking more
of your excellent post. Also, I’ve shared your site in my social networks!
Wow, amazing blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your site
is wonderful, as well as the content!
naturally like your web site however you need to test the spelling on quite
a few of your posts. Several of them are rife with spelling problems and I find it very bothersome to inform the reality
on the other hand I’ll definitely come again again.
I’m gone to say to my little brother, that he should also pay a
visit this website on regular basis to take updated from hottest gossip.
The other day, while I was at work, my sister stole my iPad and tested to see if it
can survive a 30 foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views.
I know this is completely off topic but I had to share it with someone!
what is prednisone does prednisone raise blood pressure
I know this if off topic but I’m looking into starting my own weblog 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 internet savvy so I’m not 100% positive.
Any suggestions or advice would be greatly appreciated. Thanks
Great post.
Review my webpage – yeast infection
You really make it seem so easy with your presentation but I find this topic to be really something which I
think I would never understand. It seems too complex and very broad for me.
I am looking forward for your next post, I will try to get the
hang of it!
magnificent submit, very informative. I’m wondering why the other experts of this sector don’t notice this.
You must proceed your writing. I’m confident, you’ve a huge readers’
base already!
Attractive section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire in fact enjoyed account your
blog posts. Anyway I will be subscribing to your feeds and
even I achievement you access consistently rapidly.
This post is invaluable. How can I find out more?
This piece of writing will assist the internet users for setting up new website or even a blog from start to end.
Hi! I could have sworn I’ve visited your blog before but after looking at a few of the articles I realized it’s new to me.
Anyhow, I’m definitely delighted I discovered it and I’ll be bookmarking it and checking
back regularly!
Hello there, just became aware of your blog through Google, and found that it’s
truly informative. I’m gonna watch out for brussels.
I’ll appreciate if you continue this in future. A lot of people will be benefited from your writing.
Cheers!
Write more, thats all I have to say. Literally, it seems as though you relied on the
video to make your point. You obviously know what youre talking about, why throw
away your intelligence on just posting videos to
your weblog when you could be giving us something
informative to read?
Hi my family member! I wish to say that this article is awesome,
nice written and include almost all important infos.
I would like to look more posts like this .
I have read so many posts about the blogger lovers however this paragraph is really a fastidious paragraph, keep it up.
Hmm it seems like your blog ate my first comment (it was super long) so I guess I’ll just sum it up
what I had written and say, I’m thoroughly enjoying your blog.
I as well am an aspiring blog writer but I’m still new
to the whole thing. Do you have any suggestions for newbie blog
writers? I’d definitely appreciate it.
Keep on working, great job!
I was recommended this blog by my cousin. I’m not sure whether
this post is written by him as nobody else know such detailed about my problem.
You are wonderful! Thanks!
This is a topic that’s close to my heart… Many thanks!
Where are your contact details though?
Stunning quest there. What occurred after? Take
care!
You really make it seem so easy with your presentation but
I find this matter to be actually something that I think I would never understand.
It seems too complicated and extremely broad for me. I am looking forward for your next post,
I will try to get the hang of it!
Do you mind if I quote a few of your articles as long as I provide
credit and sources back to your blog? My
blog site is in the exact same niche as yours and my visitors
would certainly benefit from a lot of the information you present here.
Please let me know if this alright with you. Cheers!
You have made some decent points there. I looked on the net for more info about the issue and found most individuals will go along with your views on this web site.
Everyone loves what you guys are usually up too.
This type of clever work and exposure! Keep up the amazing works guys I’ve included you guys to my own blogroll.
Fantastic items from you, man. I have take into accout your
stuff prior to and you are just extremely magnificent.
I really like what you’ve received right here, really like what you’re saying and the way in which during which you
are saying it. You make it enjoyable and you continue to
take care of to stay it wise. I cant wait to read much more from you.
That is actually a tremendous site.
Since the admin of this web site is working, no uncertainty very
rapidly it will be well-known, due to its quality contents.
Whoa! This blog looks exactly like my old one! It’s on a completely different topic but it has pretty much the same layout
and design. Outstanding choice of colors!
Thank you for another fantastic post. Where else may anybody get that type of info in such a perfect
manner of writing? I have a presentation subsequent week, and I’m at the search for such information.
Hello Dear, are you in fact visiting this web page regularly, if so then you will definitely
obtain nice experience.
continuously i used to read smaller articles that
also clear their motive, and that is also happening with this paragraph
which I am reading at this place.
I couldn’t resist commenting. Exceptionally well written!
I’m gone to say to my little brother, that he should also pay a quick visit this blog on regular basis to obtain updated from most up-to-date news.
Simply want to say your article is as amazing. The clearness in your post
is simply cool and i can assume you’re an expert
on this subject. Fine with your permission let me to
grab your feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.
Hi there are using WordPress for your blog platform? I’m
new to the blog world but I’m trying to get started and create
my own. Do you require any coding knowledge to make your own blog?
Any help would be greatly appreciated!
Hi! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly?
My site looks weird when browsing from my apple iphone.
I’m trying to find a theme or plugin that might be able
to correct this problem. If you have any suggestions, please share.
Thanks!
What’s up, yup this paragraph is genuinely fastidious and I have learned lot of things from
it concerning blogging. thanks.
Heya outstanding website! Does running a blog such as this require a massive amount work?
I’ve virtually no understanding of programming but I was
hoping to start my own blog in the near future.
Anyways, should you have any ideas or tips for new blog owners
please share. I understand this is off subject however I just had to ask.
Thanks a lot!
Thanks very nice blog!
Hey! Quick question that’s completely off topic.
Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone.
I’m trying to find a template or plugin that might be able
to resolve this issue. If you have any recommendations, please share.
With thanks!
Hi! 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?
I do consider all the ideas you’ve offered for your post.
They are very convincing and can definitely work. Nonetheless, the posts are too
brief for beginners. May you please prolong them a little
from subsequent time? Thanks for the post.
Oh my goodness! Awesome article dude! Thank you, However I am encountering problems with
your RSS. I don’t understand why I can’t join it. Is there
anybody else having similar RSS problems? Anybody who knows the answer can you kindly respond?
Thanx!!
I pay a quick visit each day a few websites and blogs to read content, but this web site provides feature based content.
I do believe all the concepts you have introduced on your post.
They’re really convincing and will certainly work.
Nonetheless, the posts are too short for newbies.
May you please prolong them a little from next time? Thank you for
the post.
I was suggested this blog by my cousin. I’m not sure whether this post is
written by him as nobody else know such detailed about my problem.
You are amazing! Thanks!
modafinil withdrawal modalert 200