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.
I do not even know how I stopped up here, however I assumed this submit was good.
I do not realize who you are however definitely you’re going
to a well-known blogger should you are not already.
Cheers!
We are a group of volunteers and starting a new scheme in our community.
Your site provided us with valuable info to work on. You’ve done a formidable job and our entire
community will be grateful to you.
It’s the best time to make a few plans for the long run and it is time to be happy.
I have read this put up and if I may just I
desire to counsel you some fascinating issues or suggestions.
Perhaps you could write next articles regarding this article.
I desire to read even more things about it!
This paragraph is actually a good one it assists new web users, who are wishing in favor of blogging.
of course like your web-site however you need to test the spelling on quite a few of your
posts. A number of them are rife with spelling issues
and I find it very troublesome to inform the truth nevertheless I’ll surely come again again.
My family members every time say that I am wasting my time here at web, but I
know I am getting familiarity all the time by reading such
fastidious articles.
necessary review. Also visit very own site to test out
situs slot online. This kind of web site has received detection by situs slot online bets people in Negara sendiri.
At this time there are various fascinating promos if people join presently.
Asking questions are actually good thing if you are not
understanding something totally, except this piece of writing gives nice understanding
even.
Hi there, You have done a great job. I will certainly digg it
and personally suggest to my friends. I am sure they will be benefited
from this site.
Hi colleagues, its wonderful post about teachingand entirely explained,
keep it up all the time.
Does your site have a contact page? I’m having problems locating
it but, I’d like to shoot you an email. I’ve got some ideas for your blog you might be interested in hearing.
Either way, great site and I look forward to seeing it develop over time.
Today, I went to the beachfront 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 totally off topic but I had to
tell someone!
Hmm it appears like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what
I had written and say, I’m thoroughly enjoying your blog.
I as well am an aspiring blog blogger but I’m still new
to the whole thing. Do you have any helpful hints for first-time blog writers?
I’d certainly appreciate it.
I like the helpful info you provide in your articles.
I’ll bookmark your blog and check again here regularly.
I’m quite certain I’ll learn plenty of new stuff right
here! Good luck for the next!
Quality posts is the key to interest the users to visit
the web site, that’s what this web page is providing.
Great article.
Fantastic beat ! I wish to apprentice even as you amend your web site, how could i subscribe for a weblog
site? The account helped me a appropriate deal. I were tiny bit familiar of this your broadcast offered
shiny transparent idea
Link exchange is nothing else except it is just placing the other person’s weblog link on your
page at proper place and other person will also do same in favor of
you.
Hi, 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 reduce it, any plugin or anything you can suggest?
I get so much lately it’s driving me crazy so any support is very much appreciated.
I’ve read a few just right stuff here. Certainly price bookmarking for
revisiting. I wonder how so much effort you put to create this kind of excellent informative site.
Hello, i read your blog from time to time and i
own a similar one and i was just wondering
if you get a lot of spam feedback? If so how do you reduce
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.
Hi there to all, how is all, I think every one is getting
more from this web page, and your views are pleasant
for new users.
Ahaa, its pleasant dialogue about this paragraph here at this weblog, I
have read all that, so at this time me also commenting here.
Heya i’m for the primary time here. I came across this board and I in finding It truly
useful & it helped me out much. I’m hoping to present something back and
help others like you aided me.
crucial review. Also visit one of the greatest site to own game slot online.
The following incredible web-site has received name from
judi slot video gaming people in Dalam negri. Certainly, there
will be a few amazing promos if however, you join presently.
Very good info. Lucky me I discovered your blog by chance (stumbleupon).
I have book marked it for later!
Hi, I do believe this is a great web site. I stumbledupon it 😉 I’m going to come back yet again since I book marked it.
Money and freedom is the best way to change, may you be rich and continue to guide others.
Hey there, 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, terrific blog!
Pretty section of content. I just stumbled upon your weblog 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 blog often and I seriously appreciate your content. Your article has truly peaked my interest.
I am going to book mark your site and keep checking for new information about once
per week. I subscribed to your RSS feed as well.
I think the admin of this site is truly working hard in favor of his
site, since here every stuff is quality based material.
Hi! This is my first visit to your blog! We are a collection of volunteers and starting a new initiative in a
community in the same niche. Your blog provided us valuable information to
work on. You have done a extraordinary job!
Hi there friends, its fantastic piece of writing about cultureand fully explained, keep
it up all the time.
Your style is very unique in comparison to other folks
I’ve read stuff from. I appreciate you for posting when you’ve
got the opportunity, Guess I’ll just book mark this site.
We’re a gaggle of volunteers and opening a new scheme in our community.
Your web site offered us with helpful information to
work on. You have performed a formidable task and our whole
community will probably be grateful to you.
If some one desires expert view on the topic of blogging
and site-building after that i propose him/her to pay a quick
visit this blog, Keep up the fastidious job.
I am extremely impressed with your writing skills and also with the layout on your blog.
Is this a paid theme or did you customize it yourself? Either way keep up the nice quality writing, it is rare to see a great blog like this one these days.
Hello, I enjoy reading through your article. I like
to write a little comment to support you.
I couldn’t refrain from commenting. Very well written!
Wow that was odd. 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. Anyways, just wanted to say superb blog!
I’m gone to say to my little brother, that he should also pay a quick visit this webpage on regular basis to obtain updated from
most recent news.
Hey, I think your site might be having browser compatibility issues.
When I look at your blog site 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!
Heya i am for the primary time here. I came across this board and I in finding It
truly helpful & it helped me out a lot. I am hoping
to present one thing again and aid others such as
you aided me.
Very good post. I am facing many of these issues as well..
Howdy just wanted to give you a quick heads up and let you know a few
of the images aren’t loading correctly. I’m not sure why but
I think its a linking issue. I’ve tried it in two different browsers
and both show the same outcome.
Hi are using WordPress for your blog platform? I’m new to the blog world but I’m trying
to get started and set up my own. Do you require any coding
expertise to make your own blog? Any help would be greatly appreciated!
Hello, this weekend is pleasant designed for me, for
the reason that this point in time i am reading this enormous informative paragraph here
at my home.
I loved as much as you will receive carried out right here.
The sketch is tasteful, your authored material stylish.
nonetheless, you command get got an edginess over that you wish be delivering
the following. unwell unquestionably come more formerly again as exactly the same nearly
very often inside case you shield this increase.
Hi there to all, how is all, I think every
one is getting more from this web page, and your
views are good in favor of new users.
Very good blog! Do you have any helpful hints for aspiring writers?
I’m hoping to start my own site soon but I’m a little lost on everything.
Would you advise starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I’m completely overwhelmed ..
Any recommendations? Kudos!