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.
Valuable info. Lucky me I found your web site by chance, and I’m
surprised why this accident did not happened earlier!
I bookmarked it.
Very nice article, just what I wanted to find.
Excellent blog here! Also your site loads up very
fast! What host are you using? Can I get your affiliate link
to your host? I wish my web site loaded up as quickly
as yours lol
each time i used to read smaller articles that also clear their motive, and that is also happening with this paragraph
which I am reading now.
When I initially commented I clicked the “Notify me when new comments are added” checkbox
and now each time a comment is added I get several
emails with the same comment. Is there any way you can remove me from that service?
Bless you!
Paragraph writing is also a excitement, if you
know after that you can write otherwise it is complicated to
write.
I visit day-to-day a few web pages and blogs to read articles or reviews, however this
weblog offers quality based content.
There is certainly a lot to learn about this topic. I like all the points you have made.
Have you ever considered about including a little
bit more than just your articles? I mean, what you say is important and all.
Nevertheless think of if you added some great pictures or videos to give
your posts more, “pop”! Your content is excellent but with images and clips, this site could certainly be
one of the greatest in its niche. Amazing blog!
Attractive section of content. I just stumbled upon your web site and in accession capital to assert that I get actually enjoyed
account your blog posts. Anyway I will be subscribing to your augment and even I achievement you access consistently fast.
Hello just wanted to give you a brief heads up and let you know a few of the
images aren’t loading properly. I’m not sure why but I think
its a linking issue. I’ve tried it in two different web browsers and both show the same outcome.
My relatives all the time say that I am wasting my time here at net, however I know
I am getting knowledge all the time by reading thes nice content.
Very good post. I will be dealing with many of these issues as well..
Its like you read my mind! You appear to know a lot about this, like you wrote the book in it or something.
I think that you can do with some pics to drive the message home a bit, but other than that,
this is wonderful blog. An excellent read. I
will certainly be back.
These are actually great ideas in concerning
blogging. You have touched some pleasant
factors here. Any way keep up wrinting.
I was able to find good info from your blog posts.
Yes! Finally someone writes about situs judi slot online.
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 recommendations?
Hello, just wanted to say, I loved this blog post. It was funny.
Keep on posting!
each time i used to read smaller articles or reviews that as well clear their motive, and that is also
happening with this piece of writing which I am reading now.
Hi, just wanted to mention, I liked this blog
post. It was funny. Keep on posting!
I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored subject matter stylish.
nonetheless, you command get bought an impatience
over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly very often inside
case you shield this hike.
I was able to find good information from your blog posts.
It’s ɑn remarkable article in favⲟor of all thhe online users; they will take
benefit from it I am sure.
Also visit my site: suрeritc – http://www.smokymountainadventurereviews.Com,
Hi there, You’ve done a great job. I will certainly digg it and personally
suggest to my friends. I’m sure they will be benefited from this site.
I have been exploring for a little for any high-quality articles or weblog posts on this kind of space .
Exploring in Yahoo I at last stumbled upon this site.
Studying this info So i am satisfied to express
that I’ve an incredibly just right uncanny feeling I came upon exactly what I needed.
I so much no doubt will make sure to don?t omit this
web site and give it a glance on a relentless basis.
I used to be able to find good advice from your blog articles.
Hi colleagues, nice piece of writing and fastidious arguments commented here,
I am truly enjoying by these.
If some one wishes to be updated with hottest technologies therefore he
must be visit this site and be up to date everyday.
Hello, i feel that i saw you visited my web site thus i came to return the prefer?.I am trying to find things to enhance my web site!I assume its good enough to use some
of your concepts!!
Write more, thats all I have to say. Literally, it seems
as though you relied on the video to make your point.
You obviously know what youre talking about, why waste your intelligence on just posting videos
to your blog when you could be giving us something informative to read?
Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I acquire
actually enjoyed account your blog posts. Any way I’ll be subscribing to your augment and even I achievement you access consistently quickly.
Very nice post. I just stumbled upon your weblog and
wanted to say that I’ve truly enjoyed browsing your blog posts.
After all I’ll be subscribing to your feed and I hope you
write again soon!
Write more, thats all I have to say. Literally, it seems as
though you relied on the video to make your point. You clearly know what
youre talking about, why waste your intelligence on just posting videos to
your weblog when you could be giving us something informative to read?
Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something.
I think that you can do with some pics to drive the
message home a little bit, but instead of that, this is fantastic blog.
A great read. I will certainly be back.
I’m amazed, I must say. Rarely do I encounter a blog that’s both educative and interesting, and let me
tell you, you have hit the nail on the head. The issue is something which not enough people are
speaking intelligently about. I’m very happy that I came
across this during my search for something regarding this.
Hi there are using WordPress for your blog platform? I’m
new to the blog world but I’m trying to get started and create
my own. Do you require any html coding expertise to make your own blog?
Any help would be greatly appreciated!
This is the right blog for everyone who wants to understand this topic.
You realize so much its almost hard to argue with you (not that I actually will need to…HaHa).
You certainly put a brand new spin on a topic that has been discussed for many years.
Excellent stuff, just great!
This post is worth everyone’s attention. Where can I find out more?
This is my first time pay a visit at here and i am truly
impressed to read everthing at single place.
Hello, this weekend is nice in favor of me, as this moment i am reading
this enormous educational article here at my home.
Very good information. Lucky me I discovered your blog by accident (stumbleupon).
I’ve book-marked it for later!
If you desire to improve your know-how only keep visiting this
web page and be updated with the most up-to-date news update posted
here.
If you want to obtain much from this piece of writing then you have
to apply such strategies to your won blog.
Hi there, every time i used to check webpage posts
here in the early hours in the dawn, because i like to find out
more and more.
This blog was… how do I say it? Relevant!! Finally I have found something which
helped me. Appreciate it!
Hi there all, here every one is sharing these familiarity,
thus it’s fastidious to read this webpage, and I used to visit this webpage daily.
I know this web page gives quality based posts and extra data,
is there any other web site which gives these data in quality?
I read this post fully about the comparison of most up-to-date and preceding technologies, it’s amazing article.
Hi there, its nice post on the topic of media print, we all
be aware of media is a fantastic source of facts.