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.
It’s actually very difficult in this full of activity
life to listen news on TV, so I just use the web for that reason, and obtain the hottest information.
I have been browsing online more than 2 hours today, yet I never found any interesting
article like yours. It’s pretty worth enough for me. Personally, if all web owners and bloggers made good content as you did,
the internet will be much more useful than ever before.
Every weekend i used to pay a visit this site,
as i want enjoyment, as this this web page conations truly
good funny stuff too.
Fine way of telling, and good post to obtain facts concerning my presentation focus, which i am going to convey in college.
Wow, this paragraph is nice, my sister is analyzing such things, therefore I am going to let
know her.
Hello, i think that i saw you visited my site so i came
to “return the favorâ€.I’m attempting to find things to enhance my site!I suppose its ok to use some of your
ideas!!
If you would like to get a great deal from this piece
of writing then you have to apply these techniques to your won blog.
Hello my friend! I wish to say that this post is amazing, nice written and include approximately all significant infos.
I would like to look more posts like this .
Great article.
Wow that was strange. I just wrote an extremely long comment
but after I clicked submit my comment didn’t show up.
Grrrr… well I’m not writing all that over again. Anyhow, just wanted to say excellent blog!
Hello, this weekend is nice for me, since this moment i am reading this impressive educational piece of writing here at
my residence.
I got this site from my friend who shared with me regarding
this web page and now this time I am browsing this web site and reading very informative content at
this place.
Helpful information. Lucky me I discovered your site accidentally, and I am surprised why this twist of fate didn’t came
about in advance! I bookmarked it.
Link exchange is nothing else however it is simply placing the other
person’s blog link on your page at proper place and other person will also do same in favor of you.
Great beat ! I would like to apprentice while you amend your web site,
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
Hello there! I could have sworn I’ve been to this site before but after checking through some of the post I
realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll be book-marking
and checking back frequently!
At this time I am going away to do my breakfast, afterward having my breakfast coming again to read
more news.
Keep this going please, great job!
It’s an amazing paragraph in support of all the web people; they will take benefit from it I am sure.
Good blog you’ve got here.. It’s difficult to find high-quality writing like yours
these days. I honestly appreciate people like you! Take care!!
If some one desires expert view on the topic of running a
blog then i recommend him/her to go to see this
weblog, Keep up the nice work.
Hello, I desire to subscribe for this weblog to get newest updates, so where can i do it please assist.
I used to be able to find good info from your blog posts.
Great delivery. Solid arguments. Keep up the great spirit.
Great information. Lucky me I discovered your site by accident (stumbleupon).
I’ve book-marked it for later!
No matter if some one searches for his required thing, thus he/she wants to be available that
in detail, so that thing is maintained over here.
Good day! Do you use Twitter? I’d like to follow you if that would be ok.
I’m definitely enjoying your blog and look forward
to new updates.
What i do not understood is if truth be told how you are no longer actually much more neatly-appreciated than you may be right now.
You are so intelligent. You know thus significantly relating to this matter,
made me for my part consider it from a lot of numerous angles.
Its like women and men aren’t interested unless it
is one thing to accomplish with Woman gaga!
Your individual stuffs great. At all times care for it up!
Everyone loves what you guys are usually up too. This type of clever work and coverage!
Keep up the wonderful works guys I’ve incorporated
you guys to my own blogroll.
I’m gone to convey my little brother, that he should also pay a quick visit this
web site on regular basis to obtain updated from most recent gossip.
Its like you learn my thoughts! You seem to know a lot about this, like you wrote the book in it
or something. I believe that you simply can do with a few percent to power the message house a little
bit, however other than that, that is magnificent blog.
A fantastic read. I’ll definitely be back.
I’m amazed, I must say. Rarely do I encounter a blog that’s both equally educative and interesting, and without a doubt,
you have hit the nail on the head. The issue is something not enough people are speaking
intelligently about. I am very happy I came across this in my search for something
regarding this.
Ahaa, its fastidious conversation regarding this article at
this place at this web site, I have read all that,
so at this time me also commenting at this place.
Attractive element of content. I just stumbled upon your web site and in accession capital to assert
that I get actually enjoyed account your blog posts. Any way I will be
subscribing to your augment and even I success you get entry
to persistently fast.
My family members all the time say that I am killing my time here at
web, except I know I am getting know-how all the time by reading thes good content.
I have read so many posts about the blogger lovers except this piece of writing
is in fact a good post, keep it up.
Whats up this is kind of of off topic but I was
wanting to know 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 advice from someone with experience.
Any help would be greatly appreciated!
Yes! Finally something about http://dongne.info/blog/author/quillship4/.
constantly i used to read smaller articles that also clear
their motive, and that is also happening with this post which I am reading here.
excellent points altogether, you simply gained a logo new reader.
What could you recommend about your submit that you just made a few
days in the past? Any positive?
I have been exploring for a bit for any high quality articles or weblog posts in this
kind of space . Exploring in Yahoo I at last stumbled upon this site.
Reading this info So i’m glad to exhibit that I have
a very excellent uncanny feeling I found out exactly what I needed.
I most without a doubt will make certain to do not omit this web site and
give it a glance regularly.
Fastidious respond in return of this query with solid arguments and explaining all regarding that.
I read this paragraph fully on the topic of the difference of newest and preceding technologies,
it’s remarkable article.
Yesterday, while I was at work, my sister stole my
iphone and tested to see if it can survive a thirty foot drop, just so
she can be a youtube sensation. My iPad is now broken and she has 83 views.
I know this is entirely off topic but I had to share it with someone!
I used to be able to find good advice from your content.
What a data of un-ambiguity and preserveness of precious know-how
concerning unexpected emotions.
A motivating discussion is definitely worth comment. I do think that you should publish more on this issue,
it may not be a taboo subject but typically
people don’t discuss such issues. To the next! Best wishes!!
You need to take part in a contest for one of the best blogs
on the net. I am going to highly recommend this site!
Marvelous, what a webpage it is! This webpage presents valuable data to us,
keep it up.
Very descriptive blog, I enjoyed that bit. Will there be a part
2?