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.
If some one needs expert view regarding blogging and
site-building after that i propose him/her to pay a quick visit this
weblog, Keep up the nice work.
This piece of writing will assist the internet viewers for setting up
new weblog or even a weblog from start to end.
Appreciate this post. Will try it out.
Very nice article, totally what I wanted to find.
Hi there, I believe your web site could possibly be having internet browser compatibility problems.
Whenever I look at your site in Safari, it looks fine but when opening
in Internet Explorer, it’s got some overlapping issues. I simply wanted to give
you a quick heads up! Aside from that, excellent site!
Here is my site – slot online deposit lewat dana
Amazing! This blog looks just like my old one! It’s on a totally different topic but it
has pretty much the same page layout and design.
Outstanding choice of colors!
Very quickly this web page will be famous amid all blog visitors, due to it’s nice articles
I read this article fully about the resemblance of
latest and earlier technologies, it’s remarkable article.
piercing
Link exchange is nothing else except it is only placing the other person’s webpage link on your page at suitable place and other person will
also do same in support of you.
Hello i am kavin, its my first occasion to commenting anywhere, when i read this piece of writing i thought
i could also make comment due to this good
article.
Do you have any video of that? I’d want to find out some additional information.
Hi there, I read your blogs like every week. Your humoristic style is
witty, keep it up!
Wow, fantastic weblog structure! How lengthy have you ever been blogging for?
you make running a blog glance easy. The entire glance of
your web site is excellent, as neatly as the content material!
I have been exploring for a little bit for any high quality
articles or blog posts in this kind of area .
Exploring in Yahoo I ultimately stumbled upon this web site.
Studying this info So i am glad to exhibit that I’ve a very
just right uncanny feeling I found out just what I needed.
I such a lot unquestionably will make sure to do not overlook
this web site and provides it a look regularly.
Heya i’m for the first time here. I found this board and I in finding It truly useful & it helped me out much.
I am hoping to provide something back and help others like you helped me.
Wow! This blog looks exactly like my old one!
It’s on a entirely different subject but it has pretty much the same layout and design. Superb choice of colors!
Hello, i read your blog occasionally and i own a similar one
and i was just wondering if you get a lot of spam responses?
If so how do you stop it, any plugin or anything you can advise?
I get so much lately it’s driving me mad so any help is
very much appreciated.
This is a topic that’s close to my heart…
Cheers! Where are your contact details though?
Also visit my homepage :: judi via pulsa
Someone necessarily help to make seriously posts I’d state.
That is the first time I frequented your web page and thus far?
I surprised with the analysis you made to make this particular submit amazing.
Great activity!
Because the admin of this web site is working, no doubt very rapidly
it will be renowned, due to its feature contents.
Hi there mates, its impressive article concerning teachingand fully explained, keep it up all the
time.
Link exchange is nothing else but it is only placing the other person’s webpage link on your page at appropriate
place and other person will also do same in favor of you.
You can certainly see your skills in the work you write. The world hopes for
more passionate writers such as you who are not afraid to
say how they believe. At all times follow your
heart.
What a information of un-ambiguity and preserveness of precious knowledge concerning unpredicted
emotions.
Nice answers in return of this matter with real arguments and telling the whole thing on the topic
of that.
You can certainly see your expertise in the
article you write. The arena hopes for more passionate writers like you
who are not afraid to mention how they believe.
All the time follow your heart.
Quality content is the secret to attract the users to pay a visit the web
site, that’s what this web page is providing.
I like the helpful info you provide in your articles.
I will bookmark your blog and check again here frequently.
I am quite sure I will learn many new stuff right here!
Good luck for the next!
Stunning quest there. What happened after? Take care!
Hi there! This is my first visit to your blog! We are a collection of volunteers and
starting a new project in a community in the same niche.
Your blog provided us valuable information to work on. You have
done a extraordinary job!
of course like your web site however you need to take a look at the spelling on several of your posts.
A number of them are rife with spelling issues and I to find it very bothersome to inform the
reality then again I’ll surely come back again.
Incredible quest there. What occurred after? Take care!
It’s fantastic that you are getting ideas from this piece
of writing as well as from our discussion made here.
You ought to take part in a contest for one of the highest quality sites on the web.
I will highly recommend this site!
It’s very straightforward to find out any matter on web as compared to books,
as I found this article at this site.
Appreciate this post. Will try it out.
I used to be able to find good info from your articles.
Hi to all, how is all, I think every one is getting more from this web page, and your views are
pleasant in favor of new viewers.
Now I am going away to do my breakfast, after having my breakfast
coming again to read other news.
This paragraph will assist the internet viewers for creating
new weblog or even a weblog from start to end.
Hey there, You have done a fantastic job. I will definitely digg it and personally recommend to my friends.
I am confident they’ll be benefited from this web site.
Hi to all, how is everything, I think every one
is getting more from this site, and your views are fastidious in favor of new visitors.
Hello, I enjoy reading all of your article post.
I wanted to write a little comment to support you.
Today, I went to the beach 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!
Hi there just wanted to give you a quick
heads up. The text in your article seem to be running off
the screen in Internet explorer. I’m not sure if this is a formatting issue or something to
do with browser compatibility but I figured I’d post
to let you know. The layout look great though! Hope you get the issue fixed soon. Cheers
WOW just what I was searching for. Came here by searching for https://zippyshare.com/wedgebear6
Howdy, 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 comments?
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.
What’s Going down i’m new to this, I stumbled upon this I have discovered
It positively helpful and it has aided me out loads. I am hoping to give a contribution & aid different customers like
its aided me. Good job.
I have been browsing online more than three hours today, yet I never
found any interesting article like yours. It’s pretty worth enough for me.
In my opinion, if all webmasters and bloggers made good
content as you did, the net will be much more useful than ever before.