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.
Wow that was strange. I just wrote an incredibly
long comment but after I clicked submit my comment didn’t appear.
Grrrr… well I’m not writing all that over again. Anyway, just wanted to say great
blog!
It’s the best time to make a few plans for the longer term and it is time to be happy.
I have learn this put up and if I may I want to recommend you
few interesting issues or advice. Maybe you could write next articles regarding
this article. I want to learn more issues approximately it!
Wow that was odd. I just wrote an very long comment but after I
clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyways, just wanted to say fantastic blog!
Fabulous, what a web site it is! This weblog gives valuable information to us, keep it up.
My relatives every time say that I am killing my time here at
net, but I know I am getting know-how all the time by reading
thes good articles or reviews.
Ahaa, its fastidious discussion regarding this piece of writing at this place at this web site, I have
read all that, so now me also commenting here.
Hey there! This is my first visit to your blog! We are a
group of volunteers and starting a new initiative
in a community in the same niche. Your blog provided us useful information to work on. You have done a marvellous job!
What’s up, everything is going fine here and ofcourse every one is sharing facts, that’s in fact
good, keep up writing.
I am regular reader, how are you everybody? This article posted at this site is in fact pleasant.
It is the best time to make some plans for the longer term
and it is time to be happy. I have read this put up and if I could I want to recommend you some
attention-grabbing issues or suggestions. Maybe you could write subsequent articles regarding this article.
I want to learn even more issues about it!
What’s up, all the time i used to check weblog posts here early in the dawn, as i love to find out more and more.
Pretty nice post. I just stumbled upon your
blog and wanted to say that I have truly enjoyed surfing around your
blog posts. In any case I’ll be subscribing to
your feed and I hope you write again soon!
Right away I am going to do my breakfast, once having my breakfast coming again to read further news.
Why users still use to read news papers when in this technological world everything
is available on net?
I am regular visitor, how are you everybody? This paragraph
posted at this site is actually fastidious.
I do not even know how I ended up here, but I thought this post was great.
I don’t know who you are but definitely you’re going to a famous blogger
if you aren’t already 😉 Cheers!
A motivating discussion is worth comment. I do believe that you need to write
more on this subject matter, it might not be a taboo subject but
generally people don’t talk about such topics. To the next!
Cheers!!
Write more, thats all I have to say. Literally,
it seems as though you relied on the video to
make your point. You definitely know what youre talking about, why throw away your
intelligence on just posting videos to your site when you could be giving
us something enlightening to read?
I’m gone to inform my little brother, that he should also go to see this
weblog on regular basis to obtain updated from newest
news.
Yes! Finally something about firstwellness.mx.
I’m extremely impressed with your writing skills and also
with the layout on your blog. Is this a paid theme or did you customize it yourself?
Anyway keep up the excellent quality writing, it’s rare to see a nice blog like this one
these days.
This is very interesting, You are a very skilled blogger.
I have joined your rss feed and look forward to seeking more of your wonderful post.
Also, I’ve shared your site in my social networks!
Hello! I’ve been reading your blog for some time now and finally got the bravery to go ahead and give you a shout out from
Porter Texas! Just wanted to say keep up the great work!
Hello! I’m at work browsing your blog from my new iphone 4!
Just wanted to say I love reading through your blog
and look forward to all your posts! Carry on the excellent work!
Wonderful, what a web site it is! This weblog presents useful information to us, keep
it up.
The other day, while I was at work, my cousin stole my iPad and tested to see if
it can survive a thirty foot drop, just so she can be a youtube sensation. My apple ipad is now broken and
she has 83 views. I know this is completely off topic but I had to share it with someone!
Hi, i think that i saw you visited my web site so i came to “return the favorâ€.I’m attempting to
find things to improve my site!I suppose its ok to use some of your ideas!!
constantly i used to read smaller articles or reviews that also
clear their motive, and that is also happening with this piece
of writing which I am reading here.
It’s a pity you don’t have a donate button! I’d most certainly donate
to this brilliant blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account.
I look forward to fresh updates and will talk about this blog with my Facebook group.
Talk soon!
Hi there to every one, the contents present at this site are truly amazing
for people knowledge, well, keep up the nice work fellows.
Hi there! I know this is kinda off topic nevertheless I’d figured I’d ask.
Would you be interested in exchanging links or maybe guest writing
a blog post or vice-versa? My blog addresses a lot of
the same subjects as yours and I feel we could greatly benefit from each other.
If you’re interested feel free to send me an e-mail. I look forward to
hearing from you! Fantastic blog by the way!
My web site … main slot
Greetings! This is my first visit to your blog! We are a team of
volunteers and starting a new project in a community
in the same niche. Your blog provided us beneficial information to work
on. You have done a outstanding job!
Here is my webpage :: slot pg soft gratis
hello!,I like your writing so a lot! share we communicate extra about
your article on AOL? I need an expert on this space to unravel my problem.
Maybe that is you! Taking a look forward to see you.
Wow, this article is nice, my younger sister is analyzing these kinds of things, thus
I am going to inform her.
Hello, I enjoy reading through your article post.
I like to write a little comment to support you.
This is a topic which is close to my heart… Cheers! Where
are your contact details though?
Wow, this piece of writing is fastidious, my younger sister is analyzing such things, therefore I am going to let
know her.
Here is my web page – link slot deposit pulsa 5000 Tanpa potongan
I used to be able to find good info from your
content.
Hi just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly.
I’m not sure why but I think its a linking issue. I’ve tried it in two different browsers and both show the same results.
Hi there just wanted to give you a quick heads up.
The text in your article seem to be running off the screen in Chrome.
I’m not sure if this is a format issue or something to do with internet browser compatibility but I figured
I’d post to let you know. The design look great though!
Hope you get the problem fixed soon. Kudos
It’s a pity you don’t have a donate button! I’d most certainly donate to this superb blog!
I guess for now i’ll settle for book-marking and adding
your RSS feed to my Google account. I look forward to
brand new updates and will talk about this site with my Facebook
group. Chat soon!
Great article.
Asking questions are actually fastidious thing if you are not understanding anything completely,
except this post gives fastidious understanding yet.
Having read this I thought it was extremely enlightening.
I appreciate you taking the time and effort to put this content together.
I once again find myself personally spending a significant amount of time both reading and posting comments.
But so what, it was still worthwhile!
Highly energetic article, I enjoyed that bit. Will there be a part 2?
I like the valuable info you provide in your articles.
I will bookmark your blog and check again here frequently.
I’m quite certain I’ll learn plenty of new stuff right here!
Good luck for the next!
Hi i am kavin, its my first time to commenting anywhere, when i read
this article i thought i could also create comment due to this sensible
piece of writing.
Very good blog! Do you have any recommendations 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 options out there
that I’m totally confused .. Any suggestions? Kudos!
bookmarked!!, I love your site!
Keep this going please, great job!