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.
Hmm is anyone else experiencing problems with the pictures on this blog
loading? I’m trying to find out if its a problem on my end
or if it’s the blog. Any feed-back would be greatly appreciated.
If some one wishes to be updated with most recent technologies then he must be pay a
quick visit this web page and be up to date everyday.
Great web site you have got here.. It’s hard to find good quality
writing like yours these days. I seriously appreciate people like you!
Take care!!
Hello, i feel that i noticed you visited my site thus i got here to return the want?.I’m attempting to in finding issues to improve my site!I
assume its good enough to make use of a few of your ideas!!
I’m impressed, I have to admit. Seldom do I encounter a blog that’s equally
educative and entertaining, and without a doubt, you have hit
the nail on the head. The problem is something which
not enough men and women are speaking intelligently about.
Now i’m very happy that I stumbled across this during my search for something concerning this.
I lіke the valuable info you рrovide in your articles.
I’ll bookmark your blog and chedk again һerе regularly.
I am quite sure I will larn a lot of new stuff right here!
Good luck ffor the next!
Alsso visіt my web-sіte; situs slot online baru
I’m amazed, I must say. Rarely do I come across a blog
that’s both equally educative and engaging, and let me tell you, you’ve hit
the nail on the head. The issue is something not enough people are speaking intelligently about.
I’m very happy that I came across this in my search for something relating to this.
What i don’t realize is actually how you’re no longer actually a lot more smartly-liked than you may be right now.
You’re very intelligent. You already know therefore considerably relating to this topic, produced me personally consider it from a lot of various angles.
Its like men and women aren’t involved unless it’s something to accomplish with
Lady gaga! Your own stuffs excellent. All the time deal with it up!
WOW just what I was searching for. Came here by searching for wert-tools.ru
This paragraph is actually a good one it helps new the web people, who
are wishing in favor of blogging.
Hello! I’ve been reading your blog for some time now and finally got the courage to go ahead and give you a
shout out from Humble Texas! Just wanted to tell you keep up the
excellent work!
whoah this blog is great i like studying your articles.
Keep up the good work! You know, lots of persons are hunting
around for this information, you could aid
them greatly.
Hi there i am kavin, its my first time to commenting anywhere, when i
read this paragraph i thought i could also create comment
due to this brilliant article.
Great post! We will be linking to this particularly great post on our site.
Keep up the great writing.
When some one searches for his necessary thing, therefore
he/she desires to be available that in detail, therefore that thing is maintained
over here.
It is appropriate time to make some plans for the
longer term and it’s time to be happy. I have learn this post and if I may just I wish to counsel you some attention-grabbing
issues or advice. Perhaps you could write subsequent articles regarding this article.
I desire to learn more issues about it!
It’s very easy to find out any topic on web as compared to books, as I found this paragraph at this site.
Incredible points. Sound arguments. Keep up the good work.
Today, I went to the beach front with my kids. 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
put 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 totally off topic but I had to tell someone!
Touche. Outstanding arguments. Keep up the great spirit.
You have made some good points there. I looked on the web
to find out more about the issue and found most individuals will go along with your views
on this site.
Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is fundamental and all.
However imagine if you added some great photos or video clips to give your posts more, “pop”!
Your content is excellent but with images and clips,
this site could undeniably be one of the very best in its
field. Great blog!
At this time I am ɡoing away too do my breakfast,
after having my breakfast coming yet again to read additional news.
Also visit mү web sige … situs slot online paling sering menang
Very good post. I will be dealing with some of these issues as well..
Hello, i think that i saw you visited my site thus 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!!
This text is invaluable. When can I find out
more?
It’s in fact very difficult in this busy life to listen news on Television,
thus I just use internet for that purpose, and obtain the newest news.
Aw, this was an extremely nice post. Taking a few minutes and actual effort to
generate a good article… but what can I say… I procrastinate a lot
and don’t seem to get anything done.
Link exchange is nothing else however it is simply placing the other person’s
weblog link on your page at proper place and other person will also do similar in support of you.
This article will help the internet viewers for building up new blog or even a
blog from start to end.
fantastic publish, very informative. I wonder why the opposite experts of this sector
do not understand this. You must continue your writing.
I’m sure, you’ve a huge readers’ base already!
Its like you read my mind! You appear to know
so much about this, like you wrote the book in it or something.
I think that you can do with a few pics to drive the message home a bit, but instead of that, this is fantastic blog.
A fantastic read. I’ll certainly be back.
bookmarked!!, I love your blog!
Hi! I simply would like to give you a big thumbs up for your great info you have
here on this post. I’ll be returning to your blog for
more soon.
I loved as much as you’ll receive carried out right here.
The sketch is attractive, your authored subject matter stylish.
nonetheless, you command get got an nervousness over that you wish be
delivering the following. unwell unquestionably come more formerly again as exactly the
same nearly a lot often inside case you shield this hike.
Everyone loves what you guys are up too. This kind of
clever work and coverage! Keep up the amazing works guys
I’ve incorporated you guys to blogroll.
Hi, I do think this is a great blog. I stumbledupon it 😉 I’m going to come back once again since I book marked it.
Money and freedom is the greatest way to change, may you be rich and
continue to help other people.
I just couldn’t go away your site before suggesting that
I extremely loved the usual information an individual provide in your visitors?
Is going to be again ceaselessly to inspect new posts
Great beat ! I would like to apprentice whilst you amend your site, how can i subscribe for
a weblog site? The account helped me a applicable deal. I had been a little bit familiar of this your broadcast offered vibrant clear concept
I’m gone to inform my little brother, that he should also pay a quick visit this web site on regular basis to obtain updated from hottest news update.
Incredible points. Great arguments. Keep up the great spirit.
It’s actually very difficult in this busy life to listen news on Television, so I
only use web for that reason, and take the hottest news.
I like the valuable information you provide for your articles.
I’ll bookmark your weblog and take a look at again right here regularly.
I’m rather certain I will be informed many new stuff right right here!
Best of luck for the following!
It’s a shame you don’t have a donate button! I’d most
certainly donate to this outstanding blog! I suppose for now i’ll settle for book-marking and adding your RSS feed
to my Google account. I look forward to new updates and will
talk about this site with my Facebook group. Chat soon!
Aw, this was a very nice post. Spending some time and actual effort to generate a superb
article… but what can I say… I hesitate a whole lot and never seem to get nearly anything done.
Here is my web site – http://www.geocraft.xyz
It’s going to be finish of mine day, but before finish I am reading this enormous paragraph to
improve my knowledge.
Hello, I enjoy reading all of your post. I like to write a little
comment to support you.
Ahaa, its nice dialogue concerning this paragraph at this place
at this blog, I have read all that, so now me also commenting here.
I was able to find good info from your blog posts.
Link exchange is nothing else but it is just placing the other person’s blog
link on your page at appropriate place and other person will also do same
in favor of you.