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.
Hi there to all, how is everything, I think every one is getting more from this web site, and your
views are good for new viewers.
Good day! This is my first comment here so I just wanted to
give a quick shout out and say I really enjoy reading through your blog posts.
Can you recommend any other blogs/websites/forums that
cover the same topics? Thanks!
It’s not my first time to pay a visit this web site, i am browsing this web page dailly and get good
facts from here every day.
Very nice post. I just stumbled upon your weblog and
wanted to say that I have really enjoyed surfing around your blog posts.
After all I’ll be subscribing to your feed and I hope you write again soon!
I visited many sites however the audio quality
for audio songs present at this web site is really superb.
I think this is among the most vital information for me.
And i’m glad reading your article. But should remark on some general things, The
web site style is great, the articles is really nice
: D. Good job, cheers
I’m not sure exactly why but this website is loading extremely slow for me.
Is anyone else having this issue or is it a issue on my end?
I’ll check back later and see if the problem still exists.
My brother suggested I might like this web site.
He was entirely right. This post actually made my day.
You cann’t imagine simply how much time I had spent for this info!
Thanks!
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 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 entirely off topic but I had to tell someone!
There’s certainly a great deal to know about this subject.
I like all the points you’ve made.
Thanks for sharing your thoughts about flymouses.com. Regards
Unquestionably believe that which you said.
Your favorite justification appeared to be on the net the easiest thing to be aware of.
I say to you, I certainly get annoyed while people consider worries that they plainly do not know about.
You managed to hit the nail upon the top and also defined
out the whole thing without having side effect , people could take a signal.
Will likely be back to get more. Thanks
Hmm it appears like your website 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 as well am an aspiring blog writer but I’m still new to everything.
Do you have any tips for inexperienced blog writers? I’d definitely appreciate it.
Excellent web site you have got here.. It’s hard to find quality writing like yours these days.
I honestly appreciate individuals like you! Take care!!
I know this web site offers quality dependent articles and other data, is there
any other web site which offers these kinds of stuff in quality?
I simply couldn’t depart your site prior to suggesting that I
extremely enjoyed the standard information a person supply in your guests?
Is gonna be again continuously to investigate cross-check new
posts
You could certainly see your expertise in the work you write.
The sector hopes for more passionate writers like
you who are not afraid to mention how they believe. Always follow your heart.
Someone necessarily assist to make severely articles I would state.
This is the very first time I frequented your web page and to this point?
I surprised with the analysis you made to create this particular post incredible.
Fantastic process!
Hey! Someone in my Facebook group shared this site with us so I came to give it a look.
I’m definitely enjoying the information. I’m
bookmarking and will be tweeting this to my followers!
Terrific blog and excellent design and style.
Highly descriptive post, I liked that bit. Will there
be a part 2?
Hi there, just wanted to say, I loved this blog post.
It was helpful. Keep on posting!
My partner and I stumbled over here from a different page and thought
I might check things out. I like what I see so i am just following you.
Look forward to looking into your web page yet again.
With havin so much content do you ever run into any issues of plagorism or
copyright violation? My site has a lot of completely unique content I’ve either written myself or outsourced but
it seems a lot of it is popping it up all over the web without my agreement.
Do you know any methods to help protect against content from being stolen? I’d definitely appreciate
it.
Hey there! This is my 1st comment here so I just wanted to give
a quick shout out and say I truly enjoy reading through your
blog posts. Can you recommend any other blogs/websites/forums that
cover the same topics? Many thanks!
Hello colleagues, its enormous post regarding educationand entirely
explained, keep it up all the time.
What’s up, everything is going perfectly here and ofcourse every
one is sharing information, that’s truly excellent, keep up writing.
Hello would you mind letting me know which web host you’re working with?
I’ve loaded your blog in 3 completely different web browsers and I must say this blog loads a lot faster then most.
Can you recommend a good hosting provider at a fair price?
Thanks, I appreciate it!
I needed to thank you for this fantastic read!! I definitely loved every little bit of it.
I have you bookmarked to check out new things you post…
Howdy would you mind letting me know which hosting company you’re working with?
I’ve loaded your blog in 3 different web browsers and I
must say this blog loads a lot faster then most. Can you recommend a
good hosting provider at a reasonable price?
Kudos, I appreciate it!
A person necessarily assist to make severely articles I’d
state. That is the first time I frequented your website page and thus far?
I amazed with the analysis you made to create this actual post amazing.
Wonderful job!
I really like it when folks come together and share opinions.
Great site, keep it up!
After exploring a handful of the blog posts on your web page,
I truly like your technique of blogging. I saved it to my
bookmark website list and will be checking back in the near future.
Please visit my website as well and let me know how you feel.
I read this piece of writing completely regarding the comparison of most up-to-date and preceding technologies, it’s amazing article.
Stunning story there. What occurred after? Take care!
Hi there it’s me, I am also visiting this website on a regular basis, this web site is actually pleasant
and the visitors are in fact sharing fastidious thoughts.
Yes! Finally someone writes about discuss.
Thanks for sharing your thoughts. I really appreciate your efforts and I
will be waiting for your next post thanks once again.
It’s really a cool and helpful piece of information. I am happy that
you simply shared this helpful info with us. Please stay us informed like this.
Thanks for sharing.
It’s really a nice and helpful piece of info. I am happy that you simply shared this useful information with us.
Please stay us up to date like this. Thank
you for sharing.
Aw, this was a very nice post. Taking the time and actual
effort to create a very good article… but what can I say… I put
things off a lot and don’t seem to get anything done.
This is very interesting, You’re a very skilled blogger.
I have joined your rss feed and look forward to seeking more
of your fantastic post. Also, I’ve shared your web site
in my social networks!
Hi there very cool site!! Man .. Beautiful .. Amazing .. I will
bookmark your blog and take the feeds additionally?
I am happy to seek out numerous helpful information right here within the
put up, we’d like develop more techniques in this regard, thanks
for sharing. . . . . .
My relatives every time say that I am killing my time here at web, however I know I am getting know-how everyday by reading thes good posts.
Hello there! I know this is somewhat off topic but I was wondering which blog platform
are you using for this site? I’m getting tired of WordPress
because I’ve had problems with hackers and I’m looking at alternatives for another platform.
I would be fantastic if you could point me in the direction of a good platform.
My relatives always say that I am wasting my time here at web, except I know I am getting know-how everyday by reading such good content.
Howdy! Someone in my Myspace group shared this site with us
so I came to look it over. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers!
Terrific blog and terrific style and design.
I believe that is one of the most significant information for me.
And i’m glad reading your article. But wanna remark on some basic issues, The web site taste is wonderful, the articles is in reality nice : D.
Just right activity, cheers
Thank you for every other magnificent post. The place else may just anyone get that kind of info in such a perfect means of writing?
I’ve a presentation subsequent week, and I’m at the look for
such information.
Amazing blog! Is your theme custom made or did you download it from somewhere?
A design like yours with a few simple tweeks would really make my blog stand out.
Please let me know where you got your theme. Appreciate
it
These are truly wonderful ideas in on the topic
of blogging. You have touched some nice factors here.
Any way keep up wrinting.