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.
Hi, I do think this is an excellent web site. I stumbledupon it 😉 I may
revisit yet again since I book marked it. Money and freedom is the best way to change, may you be rich and continue to help
other people.
Its like you read my mind! You seem to understand a lot approximately this, like you wrote the
e book in it or something. I believe that you can do with a few
p.c. to force the message house a little bit, but other
than that, that is great blog. A fantastic read. I will
certainly be back.
What’s Happening i’m new to this, I stumbled upon this I’ve discovered It positively helpful and it has aided me out loads.
I am hoping to contribute & help different customers like its aided me.
Great job.
Someone essentially help to make severely posts I
would state. This is the very first time I frequented your web page and so far?
I amazed with the analysis you made to create this particular submit extraordinary.
Magnificent activity!
I like the helpful info you provide in your articles.
I’ll bookmark your blog and check again here frequently.
I’m quite sure I’ll learn lots of new stuff right here!
Best of luck for the next!
Excellent beat ! I wish to apprentice while
you amend your site, how can i subscribe for a blog site?
The account helped me a acceptable deal. I had been a little bit
acquainted of this your broadcast offered bright clear idea
Hi, the whole thing is going perfectly here and ofcourse every one is sharing facts, that’s actually good, keep
up writing.
Quality posts is the crucial to interest the users to pay a quick visit the web site, that’s what this web page is providing.
Great article.
What’s up mates, its great paragraph regarding tutoringand fully explained,
keep it up all the time.
I was able to find good information from your content.
I could not resist commenting. Well written!
As the admin of this web page is working, no hesitation very rapidly it will be famous,
due to its quality contents.
Very good post! We will be linking to this great content on our site.
Keep up the good writing.
At this moment I am going to do my breakfast, afterward having my breakfast
coming yet again to read further news.
hello!,I like your writing very a lot! proportion we communicate extra about your post on AOL?
I need an expert on this area to solve my problem.
May be that is you! Having a look ahead to look you.
you’re actually a just right webmaster. The site loading speed is amazing.
It sort of feels that you’re doing any unique trick. Also, The contents are masterpiece.
you have performed a wonderful job on this subject!
Hello, I enjoy reading through your article. I wanted to write
a little comment to support you.
Its like you read my mind! You seem to know
a lot about this, like you wrote the book in it or something.
I think that you could do with a few pics to drive
the message home a bit, but instead of that, this is fantastic blog.
A great read. I’ll certainly be back.
Now I am going away to do my breakfast, later than having my breakfast coming again to
read further news.
Wow that was strange. I just wrote an extremely long comment but after I clicked
submit my comment didn’t appear. Grrrr… well I’m
not writing all that over again. Regardless, just wanted to say wonderful blog!
Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I may 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.
If some one desires to be updated with latest technologies after
that he must be pay a visit this site and be up to
date daily.
It’s impressive that you are getting thoughts from this post as well as from our discussion made at this time.
If some one wants to be updated with latest technologies
after that he must be visit this web page and be up to date every day.
As the admin of this site is working, no doubt very rapidly it
will be well-known, due to its quality contents.
Hi to every body, it’s my first pay a visit
of this blog; this web site carries remarkable and in fact good data for readers.
Greetings from Florida! I’m bored at work so I decided to browse your site on my iphone during lunch break.
I enjoy the info you provide here and can’t wait to take a look when I get home.
I’m shocked at how fast your blog loaded on my cell phone ..
I’m not even using WIFI, just 3G .. Anyhow,
fantastic blog!
Currently it sounds like Movable Type is the top blogging platform out
there right now. (from what I’ve read) Is that what you’re using on your
blog?
I just like the valuable info you provide on your articles.
I will bookmark your weblog and take a look at once more here
regularly. I am reasonably sure I will be informed
many new stuff right here! Good luck for the next!
It’s truly very complicated in this busy life to listen news
on TV, therefore I simply use web for that purpose, and obtain the latest information.
If some one wants to be updated with most up-to-date technologies after that he must be pay a visit this web
site and be up to date every day.
I’ve read several excellent stuff here. Definitely value bookmarking for
revisiting. I wonder how so much effort you put to create this kind of wonderful informative web site.
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!
In fact when someone doesn’t know afterward its up to other
visitors that they will assist, so here it happens.
This article is in fact a nice one it assists new the web users, who are wishing for
blogging.
Hola! I’ve been reading your blog for some time
now and finally got the bravery to go ahead and give you a shout out from Kingwood Tx!
Just wanted to tell you keep up the fantastic job!
I do not know whether it’s just me or if everyone else encountering problems with your blog.
It looks like some of the written text in your
content are running off the screen. Can somebody else please comment and
let me know if this is happening to them too? This
could be a problem with my web browser because I’ve had this happen previously.
Appreciate it
At this time it sounds like BlogEngine is the preferred blogging platform out there right now.
(from what I’ve read) Is that what you are using on your 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’ll be subscribing in your feeds or even I fulfillment you get admission to consistently rapidly.
important review. Furthermore visit my very own site to obtain slot.
Wonderful web-site has received unloathness received from slot pulsa online gambling rivalry in Negara sendiri.
Truth be told there are numerous fascinating promos if you ever join currently.
Its such as you read my mind! You appear to know so much approximately this, such as
you wrote the ebook in it or something. I feel that you just could do with some percent to power the message house a little bit, however instead of
that, this is fantastic blog. An excellent read.
I’ll certainly be back.
Attractive component to 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 success you get admission to consistently
quickly.
Hello, its fastidious article regarding media print, we all know media is a wonderful source
of facts.
Hi! This is kind of off topic but I need some guidance from an established blog.
Is it hard 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?
Appreciate it
Great information. Lucky me I came across your blog by chance
(stumbleupon). I’ve saved as a favorite for later!
intriguing review. Similarly visit the actual site
to examine judi slot online. This great site has received identification coming from video slot machine gambling
participants in Dalam negeri. Truth be told
there are loads of appealing promos if you join here.
Paragraph writing is also a fun, if you be familiar
with afterward you can write otherwise it is complex to write.
Hi i am kavin, its my first occasion to commenting anyplace, when i read this post i thought i could also create comment due
to this brilliant article.
It’s fantastic that you are getting thoughts from this post as
well as from our dialogue made at this time.