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 understand how I finished up here, but I assumed this put up was great.
I don’t understand who you’re but certainly you’re going to a famous blogger for those who aren’t
already. Cheers!
Hmm it seems like your blog ate my first comment (it was super long) so
I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog.
I too am an aspiring blog writer but I’m still new to the
whole thing. Do you have any tips for first-time blog writers?
I’d certainly appreciate it.
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 waste
your intelligence on just posting videos to your weblog when you
could be giving us something informative to read?
Right here is the perfect web site for everyone who wants
to understand this topic. You realize so much its almost tough to argue with you (not that I personally will need to…HaHa).
You certainly put a brand new spin on a subject that’s been discussed
for decades. Excellent stuff, just excellent!
Hi colleagues, good paragraph and good urging commented at this place, I am truly
enjoying by these.
Hello, I enjoy reading all of your post. I like to write
a little comment to support you.
It is not my first time to go to see this site, i am visiting this web site dailly and obtain fastidious
facts from here all the time.
Excellent blog you’ve got here.. It’s hard to find high-quality writing like yours these
days. I seriously appreciate people like you! Take care!!
of course like your web site however you need to test the spelling on several of your posts.
Several of them are rife with spelling problems and I in finding it very bothersome to tell the reality nevertheless I’ll
surely come again again.
It’s not my first time to pay a visit this web site,
i am visiting this site dailly and obtain good data from here daily.
It’s very easy to find out any matter on web as compared to textbooks, as I
found this post at this site.
Hey! 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 data backup. Do you have any methods to
protect against hackers?
I have read several just right stuff here.
Certainly worth bookmarking for revisiting. I surprise
how a lot attempt you put to create this kind of great informative site.
Today, I went to the beach front 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 put 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 completely
off topic but I had to tell someone!
I have been browsing online greater than three hours lately,
but I by no means found any attention-grabbing article like yours.
It’s lovely price sufficient for me. In my opinion, if all site owners and bloggers made excellent content as you did,
the internet will be much more useful than ever before.
I’d like to find out more? I’d like to find out some
additional information.
Stunning story there. What occurred after? Take care!
I am curious to find out what blog platform you happen to be working with?
I’m experiencing some minor security problems with my latest blog and I’d like
to find something more risk-free. Do you have any recommendations?
Hey there! Do you know if they make any plugins to help with Search Engine Optimization?
I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good
gains. If you know of any please share. Kudos!
Pretty element of content. I just stumbled upon your blog and in accession capital to say that I acquire
actually loved account your weblog posts. Any way
I will be subscribing for your augment and even I
achievement you get admission to persistently quickly.
This is a topic that is close to my heart… Take care! Where are
your contact details though?
Great blog here! Also your site loads up fast! What host are
you using? Can I get your affiliate link to your host? I
wish my web site loaded up as quickly as yours lol
I’ve been browsing online more than three
hours today, yet I never found any interesting article
like yours. It is pretty worth enough for me. In my view, if all web owners and bloggers
made good content as you did, the web will be a lot more useful than ever
before.
Fine way of explaining, and fastidious piece of writing
to obtain facts on the topic of my presentation topic, which i am going to present in academy.
Excellent beat ! I wish to apprentice even as you amend your site,
how could i subscribe for a weblog web site? The account helped
me a appropriate deal. I were a little bit familiar of this your broadcast provided vibrant transparent concept
Keep on working, great job!
I have been browsing on-line more than three hours as of late, but I never discovered
any interesting article like yours. It is beautiful worth sufficient for me.
In my view, if all webmasters and bloggers made excellent content material as you did, the net will likely be a lot more useful than ever before.
Greetings! I know this is kinda off topic however I’d figured
I’d ask. Would you be interested in exchanging links
or maybe guest authoring a blog article or vice-versa? My site
goes over a lot of the same topics as yours and I think we could greatly benefit from each other.
If you’re interested feel free to send me an e-mail.
I look forward to hearing from you! Terrific blog by the way!
Currently it appears like Expression Engine is the preferred
blogging platform available right now. (from what I’ve read) Is that
what you’re using on your blog?
critical review. In the same way visit our personal site that can be played slot deposit pulsa.
Wonderful web site has received title coming from game slot on line casino competition in Negara sendiri.
So there will be many handy promos when you join today.
Why visitors still make use of to read news papers when in this technological globe all is existing on web?
It’s wonderful that you are getting thoughts from this article as well as from our argument made at this time.
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’re going
to a famous blogger if you aren’t already 😉 Cheers!
I was able to find good advice from your blog posts.
Great post.
I think this is among the so much significant information for me.
And i’m glad studying your article. However wanna commentary on some general issues,
The site style is perfect, the articles is truly nice :
D. Good activity, cheers
Its like you read my mind! You seem to know so much about this, like you wrote the book in it or
something. I think that you can do with a few pics to drive the message home a
bit, but other than that, this is great blog.
An excellent read. I’ll certainly be back.
stimulating review. Moreover visit all of
our site that will be gamed game slot. This web site has received endorsement via agen slot pulsa video games people in Negara sendiri.
Certainly, there will be loads of a good idea promos should you join at
present.
Touche. Solid arguments. Keep up the great work.
I think the admin of this site is truly working hard in support of his web site,
for the reason that here every stuff is quality based information.
naturally like your web-site but you need to test the spelling on several of your posts.
Several of them are rife with spelling problems and I in finding it very troublesome to inform the reality however I will definitely come again again.
This is my first time visit at here and i am truly impressed to read everthing at single place.
Wow, this paragraph is nice, my younger sister is analyzing
such things, therefore I am going to inform her.
Useful information. Fortunate me I discovered your web site by chance,
and I’m shocked why this coincidence didn’t took place earlier!
I bookmarked it.
It’s an amazing post designed for all the online people; they will obtain benefit from
it I am sure.
I like the helpful info you provide on your articles.
I’ll bookmark your weblog and test once more here
frequently. I’m somewhat sure I’ll learn lots of new stuff proper here!
Best of luck for the next!
Wow, this paragraph is nice, my younger sister is analyzing these things, therefore
I am going to tell her.
Greetings from Idaho! I’m bored to tears at work
so I decided to browse your site on my iphone during lunch break.
I enjoy the knowledge you provide here and can’t wait to take a look when I get home.
I’m shocked at how fast your blog loaded on my phone ..
I’m not even using WIFI, just 3G .. Anyways, fantastic site!
This paragraph will help the internet viewers for setting up new web site
or even a weblog from start to end.
Hi there! I know this is kinda off topic however , I’d figured I’d ask.
Would you be interested in exchanging links or maybe guest authoring
a blog article or vice-versa? My site goes over a lot
of the same subjects as yours and I think we could greatly
benefit from each other. If you’re interested feel
free to send me an e-mail. I look forward to hearing from you!
Superb blog by the way!