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.
Hi there, I found your web site via Google at
the same time as searching for a similar topic, your web site got here up, it appears to
be like good. I’ve bookmarked it in my google bookmarks.
Hi there, simply became aware of your weblog thru Google, and located that it is truly informative.
I am gonna be careful for brussels. I will be grateful in case you proceed this {in future}.
Numerous other folks will be benefited out of your
writing. Cheers!
Hi there, just became aware of your blog through Google, and found that it is truly informative.
I am going to watch out for brussels. I’ll appreciate if you continue
this {in future}. Numerous people will be benefited from your writing.
Cheers!
you’re actually a just right webmaster. The web site loading
speed is incredible. It seems that you are doing any unique trick.
In addition, The contents are masterpiece. you’ve performed a
magnificent job in this subject!
Asking questions are genuinely fastidious thing if you
are not understanding something totally, but this article gives
nice understanding yet.
When I initially commented I clicked the “Notify me when new comments are added” checkbox and now each
time a comment is added I get three emails with the same comment.
Is there any way you can remove me from that service?
Cheers!
Everything is very open with a precise explanation of the issues.
It was truly informative. Your site is very useful.
Many thanks for sharing!
Thank you, I’ve recently been looking for information about
this topic for a while and yours is the greatest I have discovered till now.
But, what about the bottom line? Are you positive in regards to the source?
I used to be able to find good advice from your articles.
Woah! I’m really digging the template/theme of this website.
It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal.
I must say you’ve done a excellent job with this. Additionally, the
blog loads extremely quick for me on Internet explorer. Superb Blog!
Howdy this is kind of of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML.
I’m starting a blog soon but have no coding expertise so I wanted to get guidance from someone with experience.
Any help would be enormously appreciated!
This site was… how do you say it? Relevant!! Finally I’ve found something that helped me.
Thank you!
If you want to get much from this article then you have to
apply such strategies to your won blog.
Hi there would you mind stating which blog platform
you’re working with? I’m going to start my own blog in the near future but I’m having a hard time
choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most blogs and I’m looking for something unique.
P.S Apologies for being off-topic but I had to ask!
Good day! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get
my blog to rank for some targeted keywords but I’m not seeing very good results.
If you know of any please share. Cheers!
Hello excellent website! Does running a blog like this take a great deal of work?
I have no expertise in coding but I was hoping to start my
own blog soon. Anyways, if you have any ideas or techniques for new blog owners please
share. I know this is off topic but I simply had
to ask. Kudos!
I will immediately grasp your rss feed as I can not to find your
e-mail subscription hyperlink or newsletter service.
Do you have any? Kindly permit me realize in order that I could subscribe.
Thanks.
Great site. Lots of useful info here. I am sending
it to a few buddies ans additionally sharing in delicious.
And of course, thank you for your effort!
Can I simply just say what a relief to uncover somebody that really knows what they are
talking about on the net. You definitely realize how to bring an issue to light and make it important.
More people need to check this out and understand this side of the
story. I was surprised you’re not more popular given that you certainly have
the gift.
I used to be able to find good information from your blog
articles.
Hi to every body, it’s my first pay a quick visit of this
weblog; this webpage carries awesome and really excellent material for readers.
Hello, this weekend is nice designed for me, for the reason that this time i am reading this fantastic informative piece of writing here at my home.
Hi, i think that i saw you visited my blog thus i came
to “return the favorâ€.I’m trying to find things to enhance my website!I suppose its ok to
use a few of your ideas!!
My brother suggested I may like this web site.
He was totally right. This post actually made my day.
You can not imagine just how a lot time I had spent for this info!
Thanks!
hey there and thank you for your info – I’ve certainly
picked up anything new from right here. I did however expertise some technical issues using this website, as
I experienced to reload the site a lot of times previous to I could get it to
load properly. I had been wondering if your web host is OK?
Not that I am complaining, but slow loading instances times will very frequently affect your placement in google
and can damage your high-quality score if ads and marketing
with Adwords. Anyway I am adding this RSS to my
e-mail and could look out for a lot more of your respective
exciting content. Ensure that you update this again very soon.
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 could do with a few pics
to drive the message home a little bit, but instead
of that, this is magnificent blog. A fantastic
read. I will definitely be back.
Hi there i am kavin, its my first time to commenting anywhere,
when i read this post i thought i could also make comment due to this
sensible post.
Good post. I learn something totally new and challenging on blogs I stumbleupon every day.
It will always be exciting to read through content from other writers and practice
a little something from other web sites.
Great post. I was checking constantly this blog and
I’m impressed! Very helpful info specially the last part :
) I care for such information much. I was looking for this
particular info for a very long time. Thank you and good luck.
If you want to improve your know-how only keep visiting this
website and be updated with the newest information posted here.
Very good website you have here but I was wondering if
you knew of any discussion boards that cover the same topics discussed here?
I’d really like to be a part of online community where
I can get comments from other experienced individuals that share
the same interest. If you have any suggestions, please let me know.
Appreciate it!
I was recommended this blog via my cousin.
I’m now not positive whether or not this publish is written by means of him as nobody else recognise such distinct approximately my difficulty.
You’re incredible! Thank you!
It’s impressive that you are getting thoughts from this piece of
writing as well as from our discussion made here.
These are really enormous ideas in concerning blogging.
You have touched some good factors here. Any way keep
up wrinting.
Great post. I was checking continuously this blog and I’m impressed!
Extremely useful information specially the last part
🙂 I care for such info much. I was looking for this certain info for a very long time.
Thank you and good luck.
Normally I do not learn post on blogs, but I would like
to say that this write-up very pressured me to try and do it!
Your writing style has been amazed me. Thanks, quite great article.
I was able to find good information from your articles.
I go to see every day some blogs and sites to read articles,
but this web site offers feature based posts.
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 blog when you could be giving us something
informative to read?
Good day! Do you know if they make any plugins to help with Search Engine Optimization?
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. Many thanks!
Howdy! I know this is somewhat off topic but I
was wondering which blog platform are you using for this website?
I’m getting fed up of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform.
I would be awesome if you could point me in the direction of a good platform.
I’d like to find out more? I’d love to find out some
additional information.
Thanks to my father who shared with me about this website,
this website is in fact remarkable.
Hi! This post could not be written any better! Reading through this post reminds me of my previous room mate!
He always kept talking about this. I will forward this post to him.
Pretty sure he will have a good read. Thank you for sharing!
Hi there I am so happy I found your webpage, I really found you by accident, while I was
looking on Aol for something else, Anyhow I am here now and
would just like to say many thanks for a tremendous post and a all round thrilling blog (I also love the theme/design), I don’t have time
to browse it all at the minute but I have book-marked it and also added
your RSS feeds, so when I have time I will be back to
read a great deal more, Please do keep up the awesome work.
Hey there, I think your blog might be having browser compatibility
issues. When I look at your blog in Safari, 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, terrific blog!
I love your blog.. very nice colors & theme. Did you
make this website yourself or did you hire someone to do it
for you? Plz reply as I’m looking to design my own blog and
would like to find out where u got this from. thank you
My brother suggested I may like this blog. He was entirely right.
This put up actually made my day. You can not believe just how much time I had spent for this information! Thank you!
Hello, I enjoy reading all of your article post. I wanted to write a little comment
to support you.
Good day! This post could not be written any better! Reading this post reminds me of my previous room mate!
He always kept chatting about this. I will forward this page to
him. Fairly certain he will have a good read. Thank you for sharing!
I’m curious to find out what blog platform you are working with?
I’m experiencing some minor security problems with my
latest site and I would like to find something more
secure. Do you have any suggestions?