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.
Hello! 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?
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 some pics to drive
the message home a little bit, but instead of that, this is fantastic
blog. A fantastic read. I will certainly be back.
I got this web page from my friend who shared with me concerning this web site
and at the moment this time I am browsing this site and reading very informative
articles at this time.
It’s impressive that you are getting ideas from this article as well as from
our discussion made at this time.
Hi, just wanted to tell you, I loved this blog post.
It was practical. Keep on posting!
Way cool! Some very valid points! I appreciate you penning this article plus
the rest of the site is extremely good.
important review. Additionally visit all of our site so
as to judi slot. The next site has received acceptance from
slot machine gambling house both males and females in Negara sendiri.
Presently there are actually a lot of appealing promos
just in case join at this point.
Hi, I do think this is an excellent web site. I stumbledupon it ;
) I will come back once again since I book-marked it.
Money and freedom is the best way to change, may you be rich and
continue to guide other people.
Very descriptive post, I liked that a lot. Will there be a part 2?
Whats up 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 need any coding expertise to make your own blog?
Any help would be greatly appreciated!
Hi there, this weekend is fastidious designed for me, since this moment i am reading this fantastic educational
article here at my residence.
Having read this I believed it was extremely enlightening.
I appreciate you finding the time and effort to put this
short article together. I once again find myself spending
a significant amount of time both reading and posting comments.
But so what, it was still worth it!
Ahaa, its pleasant conversation on the topic of this post here at this weblog, I have read all
that, so now me also commenting at this place.
I all the time emailed this weblog post page to all my associates,
since if like to read it then my contacts will too.
Appreciate this post. Will try it out.
Hey there would you mind letting me know which webhost you’re utilizing?
I’ve loaded your blog in 3 different browsers and I must say
this blog loads a lot quicker then most. Can you suggest a good internet
hosting provider at a reasonable price? Cheers, I appreciate it!
Currently it seems like BlogEngine is the best blogging platform available right now.
(from what I’ve read) Is that what you are using on your blog?
I like the helpful information you provide in your articles.
I will bookmark your weblog and check again here regularly.
I am rather certain I’ll be informed plenty of new stuff
right here! Best of luck for the following!
What’s up, just wanted to mention, I liked this post.
It was practical. Keep on posting!
I like the valuable info you provide in your articles.
I will bookmark your weblog and check again here
frequently. I am quite certain I will learn plenty of new stuff
right here! Good luck for the next!
I like the helpful info you provide in your articles.
I’ll bookmark your weblog and check again here regularly. I’m fairly sure I will
be told many new stuff right right here! Best of luck for the following!
Hi there! This is kind of off topic but I need some advice from an established blog.
Is it very difficult to set up your own blog? I’m not very techincal but I can figure things out pretty fast.
I’m thinking about setting up my own but I’m not sure where to begin. Do you have any ideas or
suggestions? Cheers
I like what you guys are usually up too. This type of clever work and exposure!
Keep up the terrific works guys I’ve you guys to our blogroll.
Its like you read my thoughts! You appear to understand a lot approximately this, such as you wrote the book in it or something.
I believe that you can do with some % to pressure the message house a little bit, however
other than that, that is wonderful blog. A fantastic read.
I’ll definitely be back.
Great weblog here! Additionally your site loads
up fast! What host are you the use of? Can I am getting your affiliate
link to your host? I want my web site loaded up as fast as
yours lol
Hello, I would like to subscribe for this blog to get most recent updates, so where can i do it please help out.
Amazing! Its truly amazing article, I have got much clear
idea regarding from this article.
It is the best time to make a few plans for the long run and it is time to be happy.
I’ve read this publish and if I may just I want to recommend you some fascinating things or advice.
Perhaps you could write next articles referring to this article.
I want to learn even more things about it!
I like the valuable information you supply to your articles.
I’ll bookmark your weblog and check again here frequently.
I am somewhat sure I will learn a lot of new stuff right right here!
Good luck for the next!
Its not my first time to pay a visit this site, i am visiting this web site dailly and get fastidious information from
here daily.
Great post.
Hello there! Do you use Twitter? I’d like to follow you if that would be ok.
I’m absolutely enjoying your blog and look forward to new updates.
I am extremely impressed with your writing skills and also with the layout to your weblog.
Is this a paid topic or did you customize it your self?
Either way stay up the excellent quality writing, it’s
rare to see a great weblog like this one these days..
Hi to all, it’s actually a good for me to go to see this web
page, it contains useful Information.
I couldn’t refrain from commenting. Perfectly written!
The other day, while I was at work, my sister stole my iPad and tested to see if it can survive a thirty foot drop, just so she can be a youtube
sensation. My apple ipad is now broken and she has 83 views.
I know this is totally off topic but I had to share it with someone!
interesting review. In addition visit the perfect site to realize game
slot online. These pages has received acknowledgement
from the slot online on line casino members in Indonesia.
Presently there are usually many wonderful promos in the event that join during this period.
If some one wishes to be updated with latest technologies then he must be pay a quick visit this site and be
up to date everyday.
This text is priceless. How can I find out more?
I’m not sure why but this site is loading incredibly slow for me.
Is anyone else having this issue or is it a issue on my end?
I’ll check back later and see if the problem still exists.
Hi there to all, it’s truly a fastidious for me to go to see this web site, it consists of useful Information.
Write more, thats all I have to say. Literally, it seems as though you relied on the
video to make your point. You definitely 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?
We stumbled over here by a different page and thought I might as well check things out.
I like what I see so now i’m following you. Look forward to finding out about your web page repeatedly.
Heya i’m for the primary time here. I came
across this board and I to find It truly helpful & it helped me out much.
I hope to provide something again and aid others like you aided me.
Currently it appears like Movable Type is the top blogging platform
out there right now. (from what I’ve read) Is that what you are using on your blog?
Admiring the dedication 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 outdated rehashed material. Wonderful read!
I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
After going over a number of the blog posts on your web page, I honestly appreciate your
way of writing a blog. I added it to my bookmark webpage list and will be checking back soon. Please
check out my web site too and tell me what you think.
Its such as you learn my mind! You seem to know a lot
about this, like you wrote the book in it or something.
I believe that you just can do with a few percent to pressure
the message house a little bit, however other than that, this is great
blog. An excellent read. I will certainly be back.
Useful information. Lucky me I found your site
by chance, and I’m stunned why this twist of fate didn’t took
place earlier! I bookmarked it.
Hmm is anyone else experiencing problems with the images on this
blog loading? I’m trying to figure out if its a
problem on my end or if it’s the blog. Any responses would be
greatly appreciated.