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.
My coder is trying to persuade me to move to .net from PHP.
I have always disliked the idea because of the costs. But he’s tryiong
none the less. I’ve been using Movable-type on numerous websites for about a year and am nervous about switching to another platform.
I have heard great things about blogengine.net. Is there a
way I can transfer all my wordpress content into it? Any kind of help would be really appreciated!
If the cards on Andar can guess the Joker card, then Andar will bee paid the even revenue.
Take a look at my blog post: 카지노 게임 종류
Hi, Neat post. There’s an issue together with your web site in internet explorer, would test this?
IE nonetheless is the market leader and a big
portion of other folks will leave out your wonderful writing because of this problem.
Amazing issues here. I’m very glad to see your article.
Thank you a lot and I am looking ahead to touch you.
Will you kindly drop me a mail?
When someone writes an piece of writing he/she retains
the image of a user in his/her mind that how a user can know it.
So that’s why this post is amazing. Thanks!
Hello there, There’s no doubt that your site
may be having browser compatibility issues. Whenever I take a look at your blog in Safari, it
looks fine however when opening in Internet Explorer, it’s got some overlapping
issues. I just wanted to give you a quick heads up!
Apart from that, wonderful site!
I’d like to find out more? I’d want to find out some
additional information.
Hi! Do you use Twitter? I’d like to follow you if that
would be okay. I’m definitely enjoying your blog and look forward to new
posts.
Hello my loved one! I wish to say that this article is awesome, nice written and include approximately all vital infos.
I’d like to look more posts like this .
Hello There. I found your blog the usage of msn.
That is a very well written article. I’ll be sure to bookmark it and come back to learn extra
of your useful information. Thank you for the post. I’ll
certainly comeback.
This is a really good tip particularly to those new to the blogosphere.
Short but very accurate info… Many thanks for sharing this
one. A must read article!
I loved as much as you will receive carried out right
here. The sketch is tasteful, your authored material stylish.
nonetheless, you command get got an edginess over that you wish be delivering the following.
unwell unquestionably come further formerly again as exactly
the same nearly very often inside case you shield this
hike.
Pretty! This has been a really wonderful article. Thanks for supplying this information.
Great blog! Is your theme custom made or did you download
it from somewhere? A design like yours with a few simple tweeks
would really make my blog stand out. Please let me
know where you got your design. Bless you
Its like you read my mind! You seem to know a lot 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 bit, but other than that, this
is great blog. An excellent read. I will definitely be
back.
It’s amazing to visit this website and reading the views
of all mates on the topic of this piece of writing, while I am also keen of getting knowledge.
hi!,I like your writing so a lot! percentage we be in contact extra about your post on AOL?
I require an expert on this house to resolve my problem. May be that’s you!
Taking a look forward to look you.
all the time i used to read smaller articles or reviews that also clear
their motive, and that is also happening with this post which
I am reading at this time.
What’s up it’s me, I am also visiting this web page
regularly, this site is truly fastidious and the users are truly sharing fastidious
thoughts.
This info is invaluable. Where can I find out more?
My brother suggested I might like this blog. He was entirely right.
This post actually made my day. You cann’t imagine just how
much time I had spent for this information! Thanks!
Hello there! Do you know if they make any plugins to help with SEO?
I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.
If you know of any please share. Cheers!
What’s up, every time i used to check web site posts here
early in the daylight, as i love to learn more and more.
At this time it looks like Drupal is the best blogging platform
out there right now. (from what I’ve read) Is that what you are using on your blog?
Just desire to say your article is as amazing. The clearness in your post is simply excellent and i could assume you’re an expert on this subject.
Fine with your permission allow me to grab your RSS feed to keep updated
with forthcoming post. Thanks a million and please keep up the
gratifying work.
If you are going for finest contents like myself, only go to see
this web site every day as it offers quality contents,
thanks
I am now not sure where you’re getting your information, however
good topic. I must spend some time finding out much more or working out more.
Thank you for excellent info I was searching for this info for my mission.
Wonderful beat ! I would like to apprentice while you amend
your website, how could i subscribe for a blog site? The account helped me a
acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear concept
I was suggested this website by means of my
cousin. I’m no longer sure whether or not this publish is written by means
of him as nobody else recognize such unique about my
difficulty. You are amazing! Thank you!
Hi, the whole thing is going sound here and ofcourse every one is sharing
facts, that’s really good, keep up writing.
Excellent post. I used to be checking continuously this weblog and I’m
impressed! Very helpful info specifically the last phase :
) I care for such info much. I used to be
looking for this particular info for a long time. Thanks and best of luck.
I am curious to find out what blog system you are using?
I’m experiencing some minor security problems with my latest blog
and I’d like to find something more risk-free.
Do you have any suggestions?
I could not refrain from commenting. Exceptionally
well written!
Hey there terrific blog! Does running a blog similar to this require a lot of work?
I’ve virtually no understanding of coding however I had been hoping to start my own blog
in the near future. Anyway, if you have any recommendations
or techniques for new blog owners please share. I understand
this is off subject however I just needed to ask.
Thanks!
Excellent post. I am going through a few of these issues
as well..
Nice weblog here! Additionally your web site rather a
lot up fast! What web host are you the use of? Can I get your associate hyperlink on your host?
I desire my website loaded up as fast as yours lol
Hello, i think that i saw you visited my website thus i came to “return the favor”.I’m attempting to find things to improve my site!I suppose its ok to use a few of your
ideas!!
Hello! Quick question that’s totally off
topic. Do you know how to make your site mobile friendly?
My blog looks weird when viewing from my iphone 4. I’m trying
to find a template or plugin that might be able to correct this issue.
If you have any suggestions, please share. Many thanks!
Aw, this was an extremely nice post. Taking the time and actual effort to create a great article… but what can I say… I procrastinate
a whole lot and never manage to get nearly anything done.
You’re so awesome! I don’t think I have read something like that before.
So nice to find somebody with genuine thoughts on this issue.
Really.. thank you for starting this up. This website is something that
is needed on the web, someone with some originality!
Hi there, i read your blog occasionally and i
own a similar one and i was just curious if you get a lot of spam remarks?
If so how do you stop it, any plugin or anything you can recommend?
I get so much lately it’s driving me mad so any help
is very much appreciated.
Simply wish to say your article is as surprising.
The clearness in your post is just great and i can assume you’re a professional on this subject.
Well along with your permission allow me to grab your RSS feed to keep up to date with coming near near post.
Thank you a million and please carry on the rewarding work.
Right here is the perfect webpage for everyone who wishes
to find out about this topic. You understand so much its almost hard
to argue with you (not that I really would want to…HaHa).
You definitely put a brand new spin on a topic that’s been written about for many years.
Excellent stuff, just excellent!
I like what you guys are usually up too. Such clever work
and reporting! Keep up the great works guys I’ve included you guys to my blogroll.
You made some decent points there. I looked on the
net for more information about the issue and found most people will go along with your views
on this website.
Right here is the perfect site for everyone who hopes
to find out about this topic. You understand a whole lot its almost hard to
argue with you (not that I actually will need
to…HaHa). You definitely put a new spin on a topic that’s been written about for a long time.
Great stuff, just excellent!
I was recommended this website by my cousin. I’m not sure whether this
submit is written via him as nobody else recognize such precise about
my trouble. You are wonderful! Thank you!
Hmm it appears like your blog ate my first comment (it was extremely long)
so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog.
I as well am an aspiring blog blogger but I’m still new to the whole thing.
Do you have any recommendations for novice blog writers?
I’d certainly appreciate it.
I do consider all of the ideas you’ve introduced to your post.
They’re very convincing and will definitely work.
Nonetheless, the posts are too brief for starters.
Could you please extend them a bit from next time? Thanks for the post.
Hey there! Quick question that’s entirely off topic.
Do you know how to make your site mobile friendly? My blog looks weird when viewing from my iphone.
I’m trying to find a theme or plugin that might be able to
fix this problem. If you have any recommendations, please share.
With thanks!