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.
You can certainly see your skills within the work you write.
The arena hopes for more passionate writers such as you who aren’t afraid to say how they believe.
At all times go after your heart.
There is definately a lot to find out about this issue. I love all
the points you have made.
My partner and I stumbled over here coming from a different web
page and thought I should check things out. I like what I see so now i’m following you.
Look forward to checking out your web page again.
Why visitors still make use of to read news papers when in this technological globe
the whole thing is presented on net?
Have you ever considered publishing an ebook or guest authoring on other sites?
I have a blog based upon on the same information you discuss and would love to have you share some stories/information. I
know my readers would appreciate your work. If you are even remotely interested, feel
free to send me an e-mail.
Article writing is also a fun, if you know then you can write otherwise it is difficult
to write.
Have you ever considered about including a little bit more than just your articles?
I mean, what you say is valuable and everything. Nevertheless
imagine if you added some great images or video
clips to give your posts more, “pop”! Your content is excellent but with images and clips, this blog could undeniably be one of the most beneficial in its
field. Very good blog!
Have you ever considered about including a
little bit more than just your articles? I mean, what you say is important and everything.
But just imagine if you added some great pictures or video clips to give your posts more, “pop”!
Your content is excellent but with images and clips, this site could undeniably be one of
the very best in its field. Fantastic blog!
Hmm is anyone else experiencing problems with the images on this
blog loading? I’m trying to determine if its
a problem on my end or if it’s the blog. Any feedback would be
greatly appreciated.
Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is important and everything. Nevertheless
imagine if you added some great photos or video clips to give your posts
more, “pop”! Your content is excellent but with pics and video clips, this blog
could definitely be one of the most beneficial in its field.
Superb blog!
Attractive component to content. I just stumbled upon your blog and in accession capital to claim that I acquire actually loved account your weblog posts.
Any way I’ll be subscribing to your feeds and even I success you
get right of entry to constantly rapidly.
Hi! I’m at work browsing your blog from my new iphone!
Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the great work!
Link exchange is nothing else however it is simply placing the other person’s weblog link on your page at proper place and other person will also do same in support of you.
I do not even know how I ended up here, but I thought this post was great.
I do not know who you are but certainly you are going to a famous blogger if you are not already 😉 Cheers!
There’s definately a great deal to learn about this subject.
I like all of the points you’ve made.
Every weekend i used to pay a quick visit this site, as i wish for
enjoyment, for the reason that this this web site conations actually good funny stuff too.
Greetings from Los angeles! I’m bored to tears 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 surprised at how fast your blog loaded on my phone ..
I’m not even using WIFI, just 3G .. Anyhow, excellent blog!
Hi there, I desire to subscribe for this weblog to obtain newest updates, so where can i do it please help.
Hello! I’ve been reading your weblog for a while now and
finally got the courage to go ahead and give you a shout out from Humble
Tx! Just wanted to say keep up the excellent work!
I have learn a few excellent stuff here. Certainly value bookmarking for revisiting.
I wonder how a lot effort you set to create this kind of wonderful informative web site.
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 will be subscribing to your feeds and even I achievement you access consistently fast.
I’m not sure why but this weblog is loading extremely slow for me.
Is anyone else having this issue or is it a problem on my end?
I’ll check back later on and see if the problem still exists.
Hmm it appears like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I submitted and say,
I’m thoroughly enjoying your blog. I too am an aspiring blog blogger but I’m still
new to everything. Do you have any tips for rookie blog writers?
I’d certainly appreciate it.
Good day! 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?
Yes! Finally someone writes about situs judi slot online.
Hello, all is going well here and ofcourse every one is sharing facts, that’s truly excellent, keep up writing.
I pay a visit every day a few sites and blogs to read articles, except this weblog presents feature based writing.
Hi there, i read your blog from time to time and i own a similar one and i was just curious if you get
a lot of spam remarks? If so how do you prevent it, any plugin or
anything you can suggest? I get so much lately it’s driving me insane so any assistance is very much appreciated.
You can certainly see your expertise in the work you write.
The world hopes for more passionate writers like you who aren’t afraid to say how they
believe. All the time go after your heart.
Fabulous, what a web site it is! This webpage
provides helpful information to us, keep it up.
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 enlightening to read?
I’m curious to find out what blog system you happen to be working with?
I’m having some minor security issues with my latest blog and
I would like to find something more secure.
Do you have any suggestions?
I am regular visitor, how are you everybody? This article posted at this web page is
truly good.
Great article! We will be linking to this particularly great content on our site.
Keep up the great writing.
Hi! Do you use Twitter? I’d like to follow you if that would be ok.
I’m undoubtedly enjoying your blog and look forward to new posts.
It is not my first time to visit this web page,
i am visiting this web page dailly and obtain fastidious data from here
every day.
I have been exploring for a little bit for any high quality articles or weblog posts in this kind of house .
Exploring in Yahoo I finally stumbled upon this site. Studying this information So i’m glad to exhibit
that I’ve an incredibly good uncanny feeling I discovered exactly what I needed.
I most certainly will make sure to don?t
overlook this web site and give it a look regularly.
I was able to find good advice from your blog posts.
Very descriptive blog, I liked that a lot.
Will there be a part 2?
I’d like to find out more? I’d want to find out some additional information.
I’m curious to find out what blog system you’re utilizing?
I’m having some minor security problems with my latest
site and I would like to find something more secure.
Do you have any suggestions?
magnificent issues altogether, you simply gained a new reader.
What may you recommend in regards to your publish that you made
some days in the past? Any positive?
I’m truly enjoying the design and layout of your site.
It’s a very easy on the eyes which makes it much more enjoyable for me to come here and
visit more often. Did you hire out a designer to create your theme?
Outstanding work!
Appreciate this post. Let me try it out.
Excellent web site you have here.. It’s hard to find excellent writing like
yours nowadays. I honestly appreciate individuals like you!
Take care!!
My family members all the time say that I am wasting my time here at net, except I know I am getting familiarity every day by reading thes fastidious posts.
Hey there, You’ve done an incredible job. I’ll definitely digg it and personally recommend
to my friends. I am confident they’ll be benefited from this site.
I’m impressed, I must say. Seldom do I come across a blog that’s both educative and entertaining, and let me
tell you, you have hit the nail on the head.
The problem is something that not enough men and women are speaking intelligently about.
I am very happy I came across this in my hunt for something relating to this.
For latest information you have to go to see the web and
on web I found this site as a finest web site for
most recent updates.
Everyone loves what you guys are usually up too.
This kind of clever work and reporting! Keep up the superb
works guys I’ve included you guys to my blogroll.