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.
Thanks for another magnificent post. The place else could
anyone get that type of info in such a perfect manner of writing?
I’ve a presentation subsequent week, and I’m on the search for such info.
Heya i’m for the first time here. I came across this board and I find It really
useful & it helped me out a lot. I hope to give something back and help others like you aided me.
Do you have a spam problem on this blog; I also am a blogger,
and I was curious about your situation; many of us have developed some nice
procedures and we are looking to swap solutions with other folks, be
sure to shoot me an email if interested.
I do not even understand how I stopped up here, however I thought this publish was
good. I don’t realize who you are but definitely you
are going to a well-known blogger for those who are not already.
Cheers!
Terrific article! That is the kind of information that are supposed to be shared across the web.
Disgrace on Google for now not positioning this post higher!
Come on over and consult with my web site . Thanks =)
My coder is trying to persuade me to move to .net from PHP.
I have always disliked the idea because of the costs. But he’s tryiong none the less.
I’ve been using Movable-type on a number of websites for about a year and am
worried about switching to another platform. I have heard excellent
things about blogengine.net. Is there a way I can import all my wordpress posts into it?
Any help would be really appreciated!
Hi to every body, it’s my first pay a visit of this web site; this web site carries amazing and really good data in support
of visitors.
I always used to study piece of writing in news papers but now as I am a user of
internet thus from now I am using net for
articles or reviews, thanks to web.
When I originally commented I clicked the “Notify me when new comments are added” checkbox and now each
time a comment is added I get several e-mails with the same comment.
Is there any way you can remove people from that service?
Thanks!
Thanks very nice blog!
Hi there, just became aware of your blog through Google,
and found that it’s really informative. I am going to watch out
for brussels. I’ll be grateful if you continue
this in future. Lots of people will be benefited from your writing.
Cheers!
Spot on with this write-up, I honestly believe that this
site needs a great deal more attention. I’ll probably be back again to read through more, thanks for the advice!
Hi, I check your blogs like every week. Your story-telling
style is witty, keep up the good work!
Really no matter if someone doesn’t be aware of then its up to other viewers that they will
help, so here it takes place.
I visit day-to-day some blogs and sites to read articles or reviews, except this blog gives quality based posts.
Thanks for one’s marvelous posting! I certainly
enjoyed reading it, you might be a great author.
I will be sure to bookmark your blog and will often come back
later in life. I want to encourage one to continue your great posts, have a nice weekend!
Hi i am kavin, its my first occasion to commenting anywhere, when i read this piece of writing i thought
i could also create comment due to this brilliant post.
Excellent blog here! Also your website loads up very fast!
What web 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
I’m very pleased to find this page. I wanted to thank you for ones time for this particularly fantastic read!!
I definitely savored every part of it and
i also have you bookmarked to see new information in your website.
Thanks for one’s marvelous posting! I truly enjoyed reading it, you will be a great author.I will always bookmark your blog and will come back down the road.
I want to encourage you to continue your great work, have a nice afternoon!
Since the admin of this web page is working, no hesitation very rapidly it will be renowned,
due to its feature contents.
I’m gone to inform my little brother, that he should
also pay a quick visit this blog on regular basis to
get updated from most up-to-date information.
Hey There. I found your blog using msn. This is an extremely well
written article. I’ll be sure to bookmark it and return to
read more of your useful information. Thanks for the post.
I will certainly return.
If you desire to increase your knowledge just keep visiting this
site and be updated with the most recent news update
posted here.
Saved as a favorite, I really like your site!
I’m not sure exactly why but this web site is loading extremely 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.
Thanks for sharing your thoughts. I really appreciate your efforts and
I am waiting for your next write ups thank you once again.
I love your blog.. very nice colors & theme. Did you make this website yourself
or did you hire someone to do it for you? Plz reply as I’m looking to create my own blog and would like to find
out where u got this from. appreciate it
Great goods from you, man. I have understand your stuff previous to and you
are just too great. I really like what you’ve acquired here, really
like what you’re saying and the way in which you say it.
You make it enjoyable and you still care for to keep it wise.
I can’t wait to read much more from you. This is actually a great site.
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 definitely you’re going to a
famous blogger if you are not already 😉 Cheers!
Hey, I think your website might be having browser compatibility issues.
When I look at your blog in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.
I just wanted to give you a quick heads up!
Other then that, excellent blog!
First of all I want to say superb blog! I had a quick question in which
I’d like to ask if you do not mind. I was interested to
find out how you center yourself and clear your mind before writing.
I’ve had a difficult time clearing my mind in getting my ideas out there.
I truly do take pleasure in writing however it just seems
like the first 10 to 15 minutes are lost just trying to figure out
how to begin. Any recommendations or tips? Appreciate it!
Peculiar article, totally what I wanted to find.
It’s amazing to go to see this website and reading the views of all
mates concerning this post, while I am also zealous of
getting experience.
This article will help the internet visitors for setting
up new website or even a blog from start to end.
We’re a group of volunteers and opening a new scheme in our community.
Your site offered us with valuable info to work on. You have done an impressive job and our whole community will be thankful to you.
I have read so many posts on the topic of the blogger lovers however this paragraph
is in fact a fastidious post, keep it up.
hello!,I like your writing very much! share we keep in touch more approximately
your post on AOL? I need an expert in this space to solve my problem.
May be that is you! Having a look forward to see you.
I’m curious to find out what blog platform you are utilizing?
I’m experiencing some minor security problems with my latest website and I’d like to
find something more secure. Do you have any suggestions?
Have you ever considered about including a little bit more than just your articles?
I mean, what you say is important and all. But think about if you added some great photos
or videos to give your posts more, “pop”! Your content is
excellent but with pics and clips, this website could definitely be one of the most beneficial in its niche.
Superb blog!
Heya fantastic blog! Does running a blog similar to this require a
lot of work? I have very little expertise in programming but I
had been hoping to start my own blog in the
near future. Anyway, if you have any ideas or techniques for new
blog owners please share. I understand this is off subject nevertheless I just needed to ask.
Thanks!
I could not refrain from commenting. Perfectly written!
This is a great tip particularly to those fresh to the blogosphere.
Short but very accurate info… Many thanks for sharing
this one. A must read post!
I am now not positive the place you’re getting
your info, however great topic. I needs to spend a while studying much more or working out more.
Thank you for excellent info I was searching for this info for my mission.
Hi there friends, good post and good urging commented at
this place, I am in fact enjoying by these.
WOW just what I was looking for. Came here by searching for discuss
We stumbled over here coming from a different page and thought I might check things out.
I like what I see so i am just following you. Look forward to finding out about your
web page again.
Thanks for a marvelous posting! I certainly
enjoyed reading it, you will be a great author.I will make sure to bookmark your blog
and definitely will come back someday. I want to encourage that you continue your great job, have a nice morning!
Hey! I’m at work browsing your blog from my new apple iphone!
Just wanted to say I love reading through your blog and look forward to all your posts!
Carry on the great work!
You actually make it seem really easy with your presentation but I
in finding this matter to be really something which I believe I might never understand.
It sort of feels too complex and extremely large
for me. I’m looking ahead to your subsequent publish, I’ll try to get the
hold of it!