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.
Hey there! I’ve been following your blog for a long time now and finally got the
courage to go ahead and give you a shout out from New Caney Texas!
Just wanted to tell you keep up the excellent job!
When some one searches for his vital thing, thus he/she
wants to be available that in detail, thus that thing is
maintained over here.
Great article. I am going through a few of these issues as well..
Hi colleagues, how is the whole thing, and what you desire to say concerning
this article, in my view its actually amazing in favor of me.
Have you ever considered publishing an ebook or guest authoring on other sites?
I have a blog based upon on the same information you discuss
and would love to have you share some stories/information. I know my visitors would value your work.
If you are even remotely interested, feel free
to send me an e mail.
I like the helpful info you supply for your articles.
I’ll bookmark your blog and take a look at again right here
regularly. I’m relatively sure I’ll be told lots of new stuff proper right here!
Best of luck for the following!
For the reason that the admin of this web page is working,
no uncertainty very shortly it will be renowned, due to its quality contents.
It is not my first time to go to see this web site, i am
visiting this web page dailly and take pleasant data from here
every day.
Hi, this weekend is pleasant in favor of me, since this point in time i
am reading this great educational post here at
my home.
I’ve read some good stuff here. Definitely price bookmarking for revisiting.
I surprise how so much effort you put to make such a magnificent informative site.
Having read this I believed it was extremely informative.
I appreciate you spending some time and effort to put this
short article together. I once again find myself spending
way too much time both reading and commenting.
But so what, it was still worth it!
Great article. I’m experiencing some of these issues as well..
Hmm is anyone else having problems with the images on this blog loading?
I’m trying to determine if its a problem on my end or if it’s
the blog. Any feedback would be greatly appreciated.
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 submitted 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 suggestions for rookie blog writers?
I’d definitely appreciate it.
My family members every time say that I am killing
my time here at web, except I know I am getting know-how all the time by reading such pleasant articles.
For newest information you have to pay a quick visit world-wide-web and on web
I found this site as a most excellent web site for
newest updates.
Why viewers still use to read news papers when in this technological world all is accessible
on web?
I’d like to find out more? I’d want to find out some
additional information.
What’s up, I log on to your blogs on a regular basis.
Your story-telling style is witty, keep it up!
Hey! I just wanted to ask if you ever have any trouble with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to
no back up. Do you have any solutions to stop hackers?
Actually when someone doesn’t be aware of then its up to other people that
they will assist, so here it takes place.
This blog was… how do I say it? Relevant!!
Finally I have found something which helped me. Appreciate it!
WOW just what I was searching for. Came here by searching for
situs slot online terbaik
Have you ever considered about including
a little bit more than just your articles?
I mean, what you say is valuable and all.
However think about if you added some great images or video clips to give your posts more, “pop”!
Your content is excellent but with pics and videos, this blog could
undeniably be one of the most beneficial in its
field. Very good blog!
This article will assist the internet viewers for
creating new web site or even a weblog from start to end.
Hi there, i read your blog from time to time and i own a similar one and i
was just curious if you get a lot of spam comments?
If so how do you reduce it, any plugin or anything
you can recommend? I get so much lately it’s driving me
insane so any assistance is very much appreciated.
It’s very trouble-free to find out any matter on net
as compared to books, as I found this article at this web site.
I’ve been browsing on-line more than 3 hours lately, but I
by no means discovered any attention-grabbing article like yours.
It’s lovely value enough for me. Personally, if all site
owners and bloggers made excellent content as you probably
did, the internet will be a lot more helpful than ever before.
Very good info. Lucky me I ran across your blog by chance (stumbleupon).
I have book-marked it for later!
My family all the time say that I am killing my time here at
web, however I know I am getting knowledge all the time
by reading thes good content.
Today, I went to the beach with my children. I found a sea shell and gave
it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed.
There was a hermit crab inside and it pinched her ear. She never wants to go back!
LoL I know this is entirely off topic but I had to tell someone!
What’s up to all, how is the whole thing, I think every one is getting
more from this site, and your views are nice for new people.
These are truly fantastic ideas in concerning blogging.
You have touched some good things here. Any way keep up wrinting.
If some one needs to be updated with newest technologies therefore
he must be pay a quick visit this web page
and be up to date everyday.
Hey! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing a few months of
hard work due to no data backup. Do you have any methods to prevent hackers?
When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each time a comment
is added I get four emails with the same comment.
Is there any way you can remove people from that service?
Appreciate it!
Admiring the hard work you put into your site
and in depth information you provide. It’s good to come across a blog
every once in a while that isn’t the same old rehashed information. Excellent read!
I’ve saved your site and I’m adding your RSS feeds to
my Google account.
Asking questions are actually nice thing if you are
not understanding anything fully, however this post
presents pleasant understanding yet.
What i do not realize is in fact how you are now not actually
a lot more neatly-preferred than you may be right now. You are so intelligent.
You recognize thus significantly relating to this subject, made me for my part believe
it from a lot of numerous angles. Its like men and women don’t seem to be interested until it
is something to do with Woman gaga! Your personal stuffs
outstanding. At all times care for it up!
Heya i’m for the first time here. I found this board and I find It truly useful & it helped me out much.
I hope to give something back and help others like you aided me.
Hi friends, how is all, and what you wish for
to say about this article, in my view its actually amazing in favor of me.
When I originally commented I appear to have clicked the -Notify me when new comments are
added- checkbox and from now on whenever a comment is added
I recieve 4 emails with the same comment. There has to be a means you are
able to remove me from that service? Cheers!
Hey very interesting blog!
This blog was… how do you say it? Relevant!! Finally I’ve found
something which helped me. Appreciate it!
Hi there, its pleasant post regarding media print,
we all be familiar with media is a great source of facts.
What’s up, its nice article on the topic
of media print, we all be aware of media is a enormous
source of information.
Hello, i read your blog occasionally and i own a similar one and i
was just curious if you get a lot of spam
comments? If so how do you protect against 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.
I’m curious to find out what blog platform you
are working with? I’m having some small security problems with my latest blog and
I would like to find something more safeguarded. Do you have any solutions?
If some one wishes expert view on the topic of running a blog afterward i recommend him/her to pay a
quick visit this blog, Keep up the nice work.
Ahaa, its fastidious conversation regarding this paragraph
here at this weblog, I have read all that, so now me also commenting here.