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.
Superb post but I was wanting to know if you could write
a litte more on this topic? I’d be very grateful if you could elaborate a
little bit further. Appreciate it!
Hello, just wanted to tell you, I liked this post. It was funny.
Keep on posting!
Wow, incredible blog layout! How long have you been blogging for?
you make blogging look easy. The overall look of your web site
is magnificent, let alone the content!
We are a group of volunteers and opening a new scheme in our community.
Your site provided us with valuable info to work
on. You have done a formidable job and our whole community will be grateful to you.
Good blog you’ve got here.. It’s hard to find high-quality writing
like yours nowadays. I truly appreciate individuals like you!
Take care!!
What’s up, I read your blogs like every week. Your writing style is witty,
keep up the good work!
Great beat ! I wish to apprentice while you amend your web site,
how can i subscribe for a weblog web site?
The account aided me a acceptable deal. I had been tiny bit
familiar of this your broadcast offered vivid transparent concept
I’m extremely impressed with your writing skills as well as
with the layout on your weblog. Is this a paid theme or did you customize it yourself?
Either way keep up the excellent quality writing, it is rare to see a nice blog
like this one nowadays.
Incredible! This blog looks just like my old one!
It’s on a totally different topic but it has pretty much the same layout and design. Great choice of colors!
What’s up, just wanted to mention, I liked this article.
It was funny. Keep on posting!
I have read some good stuff here. Definitely price bookmarking for revisiting.
I wonder how a lot effort you set to create this type of magnificent informative web site.
Its such as you read my mind! You seem to know a lot approximately this, like you wrote
the e-book in it or something. I feel that you simply could do with
some percent to power the message house a bit, but instead of
that, that is wonderful blog. An excellent read. I’ll
definitely be back.
Fantastic beat ! I would like to apprentice while
you amend your site, how could i subscribe for a blog site?
The account helped me a applicable deal. I had been a little bit
familiar of this your broadcast offered vivid transparent idea
You actually make it seem so easy along with your presentation but I find
this matter to be actually one thing which I think I’d
never understand. It sort of feels too complex and extremely extensive for me.
I am taking a look forward for your next post, I will try
to get the cling of it!
My partner and I stumbled over here coming from a different web
page and thought I might check things out. I like what
I see so now i’m following you. Look forward to going over your web page again.
I enjoy, result in I discovered just what I used to be
having a look for. You have ended my four day long hunt!
God Bless you man. Have a nice day. Bye
What’s Going down i am new to this, I stumbled upon this I
have found It positively helpful and it has aided me out loads.
I hope to contribute & aid other customers like its aided me.
Good job.
Very good post. I will be dealing with some of these issues as well..
Yes! Finally something about https://yogicentral.science/wiki/Five_Suggestions_From_A_Private_Server_Professional.
What’s up i am kavin, its my first occasion to commenting anyplace, when i read this post i thought i
could also make comment due to this good paragraph.
Wow, wonderful weblog format! How lengthy have you been blogging for?
you made running a blog look easy. The full look of your web site is
fantastic, let alone the content!
Appreciating the time and effort you put into your blog and in depth information you present.
It’s nice to come across a blog every once in a while that isn’t the same outdated rehashed material.
Great read! I’ve bookmarked your site and I’m adding your RSS feeds
to my Google account.
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?
Hi there just wanted to give you a quick heads up. The text
in your content seem to be running off the screen in Opera.
I’m not sure if this is a formatting issue or something to do with browser compatibility
but I thought I’d post to let you know. The style and design look great though!
Hope you get the issue solved soon. Cheers
Hi! Do you know if they make any plugins to help with SEO?
I’m trying to get my blog to rank for some targeted keywords but
I’m not seeing very good success. If you know of any please share.
Appreciate it!
It’s actually very complicated in this active life to listen news on Television, therefore I only use the web for that reason, and obtain the hottest information.
These are in fact enormous ideas in concerning blogging.
You have touched some nice points here. Any way keep up wrinting.
Hi there, I log on to your new stuff daily. Your writing style is witty, keep it up!
Appreciate the recommendation. Will try it out.
Hi there, You’ve done an incredible job. I’ll certainly digg it
and personally recommend to my friends. I’m confident they will be benefited from
this site.
Hi to every one, since I am actually keen of reading this webpage’s post to be updated regularly.
It contains nice information.
Touche. Great arguments. Keep up the good work.
Link exchange is nothing else but it is only placing the other
person’s weblog link on your page at appropriate place and other person will also do similar in favor
of you.
Hi there! 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
recommendations?
There is certainly a lot to learn about this topic. I love
all of the points you’ve made.
Hello, I think your blog might be having browser compatibility issues.
When I look at your blog in Ie, 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, very good blog!
I don’t even know how I ended up here, but I thought this post was
good. I do not know who you are but definitely you’re
going to a famous blogger if you aren’t already
😉 Cheers!
Great post.
you’re in point of fact a just right webmaster. The site loading
speed is incredible. It kind of feels that you are doing any unique trick.
Moreover, The contents are masterwork. you have done a wonderful activity on this topic!
Right here is the right web site for everyone who would like to understand this
topic. You realize so much its almost tough to argue with you (not that I personally would want to…HaHa).
You certainly put a fresh spin on a subject that’s been written about for many years.
Excellent stuff, just wonderful!
Its such as you read my thoughts! You appear to grasp
so much approximately this, like you wrote the ebook in it or something.
I think that you can do with a few % to force the message house a little
bit, however instead of that, that is excellent blog.
A great read. I will definitely be back.
Good info. Lucky me I discovered your site by chance (stumbleupon).
I have book marked it for later!
Hello to all, how is all, I think every one is getting more from
this site, and your views are fastidious in favor
of new users.
Hello, i think that i saw you visited my weblog thus i came to go back
the favor?.I am trying to in finding things to improve my web site!I assume
its ok to use a few of your concepts!!
Hey very nice blog!
My relatives all the time say that I am wasting my time here at web, however I know I
am getting know-how all the time by reading thes pleasant articles.
It’s very trouble-free to find out any matter on net
as compared to textbooks, as I found this post at this site.
Hello, this weekend is pleasant for me, for the reason that this occasion i am reading this wonderful informative
piece of writing here at my residence.
Howdy! I just want to offer you a huge thumbs up for
your great info you’ve got right here on this post. I am coming back to your blog for
more soon.
I relish, cause I found exactly what I used to be
taking a look for. You have ended my 4 day long hunt!
God Bless you man. Have a nice day. Bye