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.
There is certainly a great deal to know about this issue.
I love all of the points you have made.
Good post. I am dealing with a few of these issues as well..
Feel free to visit my page: pg soft demo mahjong ways
Hi there, I desire to subscribe for this blog to obtain most up-to-date updates,
so where can i do it please help.
These are in fact impressive ideas in about blogging.
You have touched some nice things here. Any way keep up wrinting.
Yes! Finally someone writes about https://globaldefence.team/forums/users/firecall17/.
Fastidious replies in return of this difficulty with solid arguments and telling everything on the topic of that.
Helpful information. Fortunate me I found your site accidentally, and I am surprised why this accident didn’t
happened in advance! I bookmarked it.
It’s fantastic that you are getting thoughts from this article as well as from
our dialogue made at this time.
I know this web page provides quality dependent articles or reviews and extra stuff, is there any other web
page which offers these data in quality?
I could not resist commenting. Very well written!
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
certainly you’re going to a famous blogger if you aren’t already
😉 Cheers!
Very great post. I simply stumbled upon your weblog and wanted to say
that I have truly loved browsing your weblog posts. After all I’ll be subscribing for your feed and
I’m hoping you write once more very soon!
Howdy! Do you know if they make any plugins to safeguard against hackers?
I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?
Hi, I want to subscribe for this webpage to take most recent updates, thus
where can i do it please assist.
Great beat ! I would like to apprentice even as you amend your site, how could i subscribe
for a weblog web site? The account helped me a applicable deal.
I had been tiny bit familiar of this your broadcast provided brilliant
transparent idea
all the time i used to read smaller articles which also clear their motive, and that is also
happening with this article which I am reading now.
I do not even know how I ended up here, but I thought this post was good.
I don’t know who you are but definitely you are going to a famous
blogger if you aren’t already 😉 Cheers!
I was able to find good information from your blog posts.
Hi, I wish for to subscribe for this web site
to take latest updates, therefore where can i do it please help out.
Excellent article. I’m dealing with many of these issues as well..
Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I’m going to return once again since I saved as a favorite it.
Money and freedom is the best way to change, may you be rich and continue to guide
others.
Hi there! Do you know if they make any plugins to assist 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. Appreciate it!
I’m not sure exactly why but this blog is loading incredibly slow for me.
Is anyone else having this problem or is it a problem on my end?
I’ll check back later on and see if the problem still exists.
Having read this I thought it was rather enlightening. I appreciate you taking the time and energy to put this information together.
I once again find myself spending a lot of time both
reading and leaving comments. But so what, it was still worth it!
Hi every one, here every person is sharing these familiarity, so it’s fastidious to read this web site,
and I used to pay a visit this weblog every
day.
These are in fact wonderful ideas in regarding blogging. You have touched some
fastidious things here. Any way keep up wrinting.
Asking questions are actually fastidious thing if you are
not understanding anything fully, but this piece of writing
gives good understanding even.
Helⅼo, for all time i used to chek weblog posts here
early in the dawn, for the reason that i like to find out mofe
and morе.
My web page この情報に従ってください
Hi there! 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 posts.
Because the admin of this site is working, no uncertainty very
rapidly it will be famous, due to its quality contents.
Useful information. Fortunate me I discovered your site accidentally,
and I’m shocked why this twist of fate did not happened
in advance! I bookmarked it.
It’s going to be ending of mine day, except before ending I am reading this enormous post to improve my know-how.
Keep this going please, great job!
Hi there friends, its great piece of writing concerning teachingand entirely explained, keep it up all the
time.
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 suggestions would be greatly appreciated.
Excellent site you’ve got here.. It’s difficult to find good quality writing like yours these
days. I truly appreciate people like you! Take care!!
Wow! This blog looks exactly like my old one!
It’s on a completely different topic but it has pretty much
the same page layout and design. Wonderful choice of
colors!
I’ve read some excellent stuff here. Definitely worth bookmarking for
revisiting. I wonder how a lot effort you set to create one
of these wonderful informative site.
Great blog here! Also your web site quite
a bit up fast! What host are you the use of? Can I get your affiliate link to your host?
I wish my web site loaded up as fast as yours lol
Admiring the hard work you put into your blog and detailed information you provide.
It’s great to come across a blog every once in a while that isn’t the same out of date rehashed information. Fantastic read!
I’ve saved your site and I’m adding your RSS
feeds to my Google account.
I couldn’t resist commenting. Well written!
Highly energetic article, I enjoyed that a lot. Will there be
a part 2?
For latest news you have to visit internet and on internet I found this
site as a finest web site for newest updates.
Hi 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.
Anyways, I’m definitely delighted I found it and I’ll be bookmarking and checking back
frequently!
No matter if some one searches for his vital thing, therefore he/she wishes to be available that in detail, therefore that thing is maintained over 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 beneficial information to work on. You have done a extraordinary job!
When some one searches for his necessary thing, thus he/she wants to be available that in detail, therefore that thing is
maintained over here.
Hey very interesting blog!
What’s up every one, here every one is sharing these kinds of knowledge,
so it’s good to read this web site, and I used to visit this webpage every day.
Hi there, I think your web site could possibly be having internet browser compatibility problems.
When I look at your web site in Safari, it looks fine but when opening in IE, it’s got some overlapping issues.
I merely wanted to give you a quick heads up! Apart from that, great site!