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.
Very good information. Lucky me I recently found your site by chance (stumbleupon).
I have saved it for later!
Hello, I enjoy reading all of your article post.
I wanted to write a little comment to support you.
This is a topic that is near to my heart… Take care!
Exactly where are your contact details though?
With havin so much content do you ever run into any issues
of plagorism or copyright infringement? My blog has a
lot of completely unique content I’ve either created myself or outsourced but it looks like a
lot of it is popping it up all over the internet without my agreement.
Do you know any methods to help reduce content from being stolen? I’d truly appreciate it.
I couldn’t resist commenting. Exceptionally well written!
If you wish for to obtain a great deal from this paragraph then you have to apply these techniques
to your won web site.
Hi, I would like to subscribe for this weblog to obtain most up-to-date updates, thus where can i do it please help out.
It’s impressive that you are getting thoughts from
this post as well as from our dialogue made at this time.
Hey very interesting blog!
Quality posts is the main to be a focus for the people to go to see the site,
that’s what this site is providing.
I for all time emailed this web site post page to all my friends,
as if like to read it after that my friends will
too.
I enjoy what you guys are usually up too. This
type of clever work and reporting! Keep up the very good works guys I’ve incorporated you guys to my personal
blogroll.
This paragraph will assist the internet users for building
up new weblog or even a blog from start to end.
Wow, this paragraph is nice, my sister is analyzing these kinds
of things, therefore I am going to convey her.
Great information. Lucky me I recently found your site by
accident (stumbleupon). I’ve book-marked it for later!
Someone necessarily help to make seriously posts I might state.
This is the very first time I frequented your web page and up to now?
I amazed with the analysis you made to make this actual publish incredible.
Magnificent activity!
Ahaa, its fastidious discussion concerning this paragraph at this
place at this webpage, I have read all that, so at
this time me also commenting here.
I for all time emailed this webpage post page to all my friends,
as if like to read it after that my links will too.
If some one desires to be updated with latest technologies therefore he must be pay a
quick visit this web page and be up to date every day.
Highly energetic article, I liked that a lot. Will there be a part 2?
I like the valuable information you provide in your articles.
I will bookmark your blog and check again here frequently.
I am quite certain I will learn lots of new stuff right here!
Best of luck for the next!
Right here is the right web site for everyone who hopes to find out about this topic.
You understand so much its almost tough to argue with you (not that I actually will need to…HaHa).
You definitely put a brand new spin on a topic that has been discussed for
a long time. Excellent stuff, just wonderful!
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 site when you could be giving us something informative
to read?
I think the admin of this site is actually working hard in favor of his web page, since here
every material is quality based stuff.
I think the admin of this web page is in fact working
hard for his web page, because here every
stuff is quality based information.
I love it when folks get together and share opinions.
Great site, stick with it!
Great info. Lucky me I recently found your blog by accident (stumbleupon).
I’ve saved as a favorite for later!
Hi to all, because I am truly keen of reading this weblog’s post to
be updated regularly. It carries good stuff.
Hi, its nice piece of writing regarding media print, we all
know media is a impressive source of facts.
magnificent points altogether, you simply received a new reader.
What may you suggest in regards to your put up that you just made some days ago?
Any certain?
Hi! I’m at work browsing your blog from my new apple iphone!
Just wanted to say I love reading your blog and look forward to all your posts!
Keep up the superb work!
This info is priceless. Where can I find out more?
critical review. In addition visit typically the site which is often enjoyed agen slot deposit pulsa.
This amazing site has received good reputation using
agen slot deposit pulsa betting people in Dalam negri.
There are generally numerous appealing promos when you
join now.
Fine way of explaining, and fastidious article to take data concerning my presentation focus, which i am going to present in college.
Excellent site you’ve got here.. It’s difficult to find excellent writing like yours nowadays.
I honestly appreciate individuals like you! Take care!!
whoah this blog is excellent i love reading your articles.
Stay up the good work! You know, a lot of persons are hunting round for this info, you could help them greatly.
fantastic publish, very informative. I wonder why the opposite experts
of this sector don’t realize this. You must continue your writing.
I am sure, you have a great readers’ base already!
Heya i am for the primary time here. I came across this board and
I find It truly useful & it helped me out a lot.
I am hoping to provide something back and help others like you aided me.
This is the right webpage for anybody who wants to
find out about this topic. You know a whole lot its
almost hard to argue with you (not that I actually
will need to…HaHa). You definitely put a fresh spin on a subject
that has been written about for years. Great stuff, just
wonderful!
It’s not my first time to visit this site, i am visiting this site dailly and get pleasant data from here all the
time.
I’ve read some just right stuff here. Certainly value bookmarking for revisiting.
I wonder how a lot effort you place to create any such
magnificent informative site.
Attractive element of content. I simply stumbled upon your site and in accession capital to assert that I acquire
actually loved account your blog posts. Anyway I’ll be subscribing to your feeds and even I fulfillment you access
consistently fast.
Hi! I know this is kinda off topic nevertheless I’d figured I’d ask.
Would you be interested in exchanging links or maybe guest writing a blog article or vice-versa?
My site covers a lot of the same topics as yours and I think we could greatly benefit from
each other. If you’re interested feel free to shoot me an e-mail.
I look forward to hearing from you! Terrific blog by the way!
This is my first time go to see at here and i am
in fact pleassant to read everthing at one place.
It’s amazing to pay a visit this web page and reading the views of
all mates concerning this post, while I am also keen of
getting knowledge.
Here is my blog: poker idn pulsa
Hello to all, how is all, I think every one is getting more from this site, and your views are pleasant in support of new viewers.
naturally like your web-site but you need to take a look at the
spelling on several of your posts. A number of them are rife
with spelling issues and I find it very bothersome to tell the reality on the other hand I will definitely come back again.
The other day, while I was at work, my cousin stole my iphone and tested to see if
it can survive a 25 foot drop, just so she can be a youtube sensation. My apple ipad is now destroyed and
she has 83 views. I know this is entirely off topic but I had
to share it with someone!
naturally like your web site however you have to take a look
at the spelling on quite a few of your posts. Several of them
are rife with spelling issues and I in finding it very troublesome to tell the truth
then again I will surely come again again.
Wow that was odd. I just wrote an very long comment but after I clicked submit my comment didn’t appear.
Grrrr… well I’m not writing all that over again. Anyhow, just wanted
to say great blog!