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.
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 throw away your intelligence on just posting videos to your weblog when you could
be giving us something enlightening to read?
Truly no matter if someone doesn’t understand
after that its up to other visitors that they will help,
so here it happens.
Great site you have here.. It’s difficult to find good quality
writing like yours nowadays. I honestly appreciate people like
you! Take care!!
Excellent blog you have got here.. It’s difficult to find good quality
writing like yours these days. I seriously appreciate people like
you! Take care!!
Good article. I will be facing many of these issues as well..
Howdy! Someone in my Facebook group shared this site with us so
I came to take a look. I’m definitely loving the information. I’m bookmarking and will
be tweeting this to my followers! Excellent blog and fantastic design.
Hi there to every body, it’s my first pay a quick visit of
this web site; this blog carries amazing and in fact fine
information in favor of readers.
bookmarked!!, I like your blog!
Pretty part of content. I just stumbled upon your site and in accession capital to assert that
I acquire in fact loved account your weblog posts. Anyway I will
be subscribing in your feeds and even I achievement you get entry to persistently rapidly.
Great site you have got here.. It’s difficult to find high-quality writing like yours
nowadays. I honestly appreciate individuals like you!
Take care!!
fantastic put up, very informative. I’m wondering why the opposite experts of this sector do not understand this.
You must proceed your writing. I am confident, you have a great readers’ base already!
Today, I went to the beach with my children. I found a sea
shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.”
She placed the shell to her ear and screamed. There was a hermit
crab inside and it pinched her ear. She never wants to go back!
LoL I know this is entirely off topic but I
had to tell someone!
I’m extremely impressed with your writing skills as well as with the layout on your blog.
Is this a paid theme or did you customize it yourself?
Either way keep up the excellent quality writing, it’s rare to
see a nice blog like this one these days.
I was curious if you ever considered changing the layout of
your blog? Its very well written; I love what youve got to say.
But maybe you could a little more in the way of content so people could connect with it better.
Youve got an awful lot of text for only having one or two images.
Maybe you could space it out better?
Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I acquire in fact enjoyed account your blog posts.
Anyway I’ll be subscribing to your feeds and even I achievement you access consistently quickly.
Hello, its pleasant piece of writing on the topic of media
print, we all be familiar with media is a wonderful source of data.
Hi, its fastidious paragraph about media print, we all be aware
of media is a wonderful source of information.
Appreciate the recommendation. Will try it out.
It’s truly very complicated in this full of activity life to listen news
on TV, so I simply use world wide web for that reason, and take
the hottest news.
Hi there to every single one, it’s in fact a good for me to visit this web page, it includes helpful
Information.
Pretty section of content. I just stumbled upon your blog and
in accession capital to assert that I acquire in fact enjoyed account your blog posts.
Anyway I will be subscribing to your feeds and even I achievement you
access consistently quickly.
Hello! I’ve been following your site for some time now and finally got the bravery
to go ahead and give you a shout out from Kingwood Tx! Just wanted to mention keep
up the excellent work!
I’m impressed, I must say. Rarely do I come across a
blog that’s both equally educative and engaging, and without a doubt, you have hit the nail on the
head. The problem is something too few people are speaking
intelligently about. Now i’m very happy I found this in my search for something concerning this.
What i don’t understood is in reality how you’re now not actually a lot more
smartly-preferred than you may be right now. You’re very intelligent.
You recognize therefore significantly in the case
of this subject, made me individually imagine it from so many numerous angles.
Its like women and men don’t seem to be fascinated unless it’s one thing to do with
Girl gaga! Your individual stuffs nice. At all times deal with it up!
For latest information you have to pay a visit world wide web and on the web I found this
site as a best web page for newest updates.
Wonderful post! We will be linking to this great article on our site.
Keep up the good writing.
If some one needs expert view concerning blogging after that i advise him/her to visit
this blog, Keep up the pleasant job.
Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your blog?
My blog site is in the very same area of interest
as yours and my visitors would truly benefit from a lot of the information you provide here.
Please let me know if this ok with you. Regards!
Hello! Do you use Twitter? I’d like to follow you if that
would be okay. I’m absolutely enjoying your blog and look forward to new updates.
Hi, I think your site 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, wonderful blog!
my blog :: wikibase2.digicult-verbund.de
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 out of date rehashed material.
Wonderful read! I’ve bookmarked your site and I’m adding your RSS feeds to my
Google account.
I am actually grateful to the holder of this site who has shared this impressive paragraph at
here.
I get pleasure from, result in I discovered just what I was having a
look for. You have ended my 4 day lengthy hunt!
God Bless you man. Have a great day. Bye
I like the helpful info you provide in your articles.
I’ll bookmark your weblog and check again here frequently.
I’m quite certain I will learn a lot of new stuff right here!
Good luck for the next!
With havin so much content and articles do you ever run into
any issues of plagorism or copyright violation? My site has a lot of completely unique
content I’ve either authored myself or outsourced but it appears a lot of
it is popping it up all over the web without my agreement.
Do you know any techniques to help protect against content from being stolen? I’d certainly appreciate it.
Today, I went to the beach front with my kids.
I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed
the shell to her ear and screamed. There was a hermit crab inside and it pinched
her ear. She never wants to go back! LoL I know this is entirely
off topic but I had to tell someone!
There’s definately a great deal to know about this topic.
I like all the points you have made.
I like it whenever people get together and share views. Great
site, keep it up!
This post is priceless. Where can I find out more?
Very nice post. I absolutely love this site.
Keep writing!
Appreciate the recommendation. Will try it out.
Hi there! This is my first visit to your blog! We are a team of volunteers and starting a new project in a community
in the same niche. Your blog provided us beneficial information to work
on. You have done a wonderful job!
Its like you read my mind! You appear 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 other than that, this
is excellent blog. A fantastic read. I’ll definitely be back.
Hello, after reading this remarkable article i am also delighted to share my knowledge
here with colleagues.
I don’t even know how I ended up here, but I thought this post was good.
I don’t know who you are but definitely you are going to a famous blogger
if you are not already 😉 Cheers!
I absolutely love your site.. Very nice colors & theme.
Did you build this web site yourself? Please reply
back as I’m attempting to create my own site and would like to learn where you got this from or just what the theme is named.
Cheers!
I don’t know if it’s just me or if perhaps everybody else encountering problems with your site.
It appears as if some of the written text on your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well?
This may be a issue with my browser because I’ve had this happen previously.
Cheers
Somebody essentially help to make severely posts I would
state. That is the first time I frequented your web page and thus far?
I surprised with the analysis you made to create this
particular submit extraordinary. Excellent process!
Good way of telling, and good article to obtain data concerning my presentation topic, which i am going to convey in academy.
I like the helpful information you provide in your articles.
I will bookmark your weblog and check again here regularly.
I am quite sure I’ll learn lots of new stuff right here! Best of
luck for the next!