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.
Keep this going please, great job!
Hi i am kavin, its my first time to commenting anywhere, when i read this post i
thought i could also make comment due to this good paragraph.
Hi, just wanted to say, I liked this article. It was inspiring.
Keep on posting!
Asking questions are actually good thing if you are not understanding
something entirely, however this paragraph offers pleasant understanding yet.
I blog frequently and I seriously appreciate your information. Your article has truly peaked my interest.
I am going to book mark your blog and keep
checking for new details about once a week. I
subscribed to your Feed as well.
It’s great that you are getting ideas from this paragraph as
well as from our dialogue made at this time.
I think that is one of the most important information for me.
And i’m happy studying your article. But wanna statement on some basic issues, The site taste is perfect, the articles is actually nice : D.
Good job, cheers
Hey there just wanted to give you a brief 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 results.
I could not refrain from commenting. Exceptionally well written!
I blog often and I truly appreciate your content.
Your article has truly peaked my interest.
I’m going to book mark your site and keep checking for new information about once a week.
I subscribed to your Feed as well.
Having read this I believed it was very informative.
I appreciate you taking the time and energy to
put this short article together. I once again find myself personally spending a significant
amount of time both reading and leaving comments. But so what,
it was still worth it!
I enjoy, lead tо I found exactly ѡhаt I uxed tօo be taҝing а ⅼook for.
Υou’ve endеd mmy fоur dɑy lοng hunt!
God Bless үou mɑn. Hɑνe a grеɑt dаy. Bye
Αlso visit my web site дэлгэрэнгүй мэдээллийг уншина уу
Excellent blog! Do you have any tips for aspiring writers?
I’m hoping to start my own blog 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 options out there that I’m totally overwhelmed ..
Any suggestions? Bless you!
What’s up, its fastidious paragraph concerning media print, we all know
media is a fantastic source of facts.
It’s remarkable to visit this web page and reading the views of all friends about this post, while I am also
keen of getting know-how.
This post is worth everyone’s attention. Where can I find out more?
Greetings! This is my first visit to your blog! We are a group 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!
Keep on working, great job!
Excellent way of telling, annd pleasant paragraph too gеt data about
my presentation subject, ѡhich i am ցoing
to deliver in institution oof һigher education.
Feeel free to surf tо my blog post; 詳細情報を入手する
Hmm is anyone else having problems with the images
on this blog loading? I’m trying to find
out if its a problem on my end or if it’s the blog.
Any feedback would be greatly appreciated.
My spouse and I stumbled over here different web page and thought I may as well check things out.
I like what I see so now i’m following you. Look forward to exploring your web page for a second time.
I pay a visit day-to-day a few web sites and sites to read posts, however this blog presents feature based posts.
Good day! Do you use Twitter? I’d like to follow
you if that would be okay. I’m undoubtedly enjoying your blog and
look forward to new updates.
This is very interesting, You are a very skilled blogger.
I have joined your feed and look forward to seeking more of your magnificent post.
Also, I’ve shared your site in my social networks!
Admiring the hard work you put into your site and in depth
information you present. It’s good to come across a blog every once
in a while that isn’t the same outdated rehashed information. Excellent read!
I’ve bookmarked your site and I’m including your RSS feeds to my Google account.
I’ve learn several excellent stuff here. Definitely worth bookmarking for revisiting.
I surprise how so much attempt you set to make one of these excellent informative site.
My partner and I stumbled over here from a different web page
and thought I may as well check things out. I like what I see so
i am just following you. Look forward to
checking out your web page for a second time.
Hi there! I just wanted to ask if you ever have any trouble with hackers?
My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup.
Do you have any methods to protect against hackers?
Hi there, just wanted to tell you, I enjoyed this post.
It was inspiring. Keep on posting!
Look at my site: deposit slot pulsa
It’s going to be finish of mine day, but before finish I am reading this great article to improve my knowledge.
Wow! This blog looks just like my old one! It’s on a completely different subject but it has pretty much the same page layout
and design. Great choice of colors!
Saved as a favorite, I love your site!
I’m gone to say to my little brother, that he should also pay a quick visit this weblog on regular basis to get updated from latest gossip.
Hi there mates, how is the whole thing, and what you would like
to say concerning this post, in my view its
in fact amazing for me.
In fact no matter if someone doesn’t be aware of then its up to
other viewers that they will help, so here it occurs.
Hi there, I enjoy reading all of your article. I wanted to
write a little comment to support you.
Hey very interesting blog!
Hello i am kavin, its my first occasion to commenting anywhere, when i read this article
i thought i could also make comment due to this brilliant paragraph.
Pretty part of content. I simply stumbled upon your weblog and in accession capital to claim that I get in fact loved account your blog posts.
Anyway I will be subscribing to your augment and even I
success you access persistently quickly.
magnificent issues altogether, you simply received a emblem new reader.
What might you recommend in regards to your submit that you simply made a few days in the past?
Any positive?
Hurrah! At last I got a weblog from where I be able to truly
obtain useful data regarding my study and knowledge.
Hello, just wanted to mention, I enjoyed this blog post.
It was inspiring. Keep on posting!
It’s an amazing article in support of all the web people; they will take
advantage from it I am sure.
Heya! I just wanted to ask if you ever have any issues with hackers?
My last blog (wordpress) was hacked and I ended up losing many
months of hard work due to no back up. Do you have any methods to stop hackers?
It’s going to be ending of mine day, but before ending I am
reading this fantastic paragraph to increase my
knowledge.
I just like the helpful information you provide in your articles.
I will bookmark your blog and check again right here regularly.
I’m quite certain I will be informed plenty of new stuff right
here! Good luck for the next!
For most up-to-date news you have to pay a quick visit
world-wide-web and on web I found this web
page as a best web site for most up-to-date updates.
It’s very easy to find out any matter on net as compared to books,
as I found this article at this web site.
Yesterday, while I was at work, my cousin stole my iphone and tested to see if it can survive a twenty five foot drop, just
so she can be a youtube sensation. My iPad is now broken and she has 83 views.
I know this is entirely off topic but I had to share it with someone!
It’s not my first time to pay a quick visit this web site, i am browsing this site dailly and take good information from here everyday.