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.
Usually I do not learn post on blogs, but I wish to say that this write-up very compelled me to check out and do it!
Your writing taste has been surprised me. Thanks, very nice post.
If some one needs to be updated with hottest technologies afterward he must be go to see this web page and be up to date everyday.
For most recent news you have to visit world-wide-web
and on web I found this web site as a most excellent web site for most up-to-date
updates.
Link exchange is nothing else however it is
simply placing the other person’s web site link on your page at proper place and
other person will also do similar for you.
This is really interesting, You are a very skilled blogger.
I have joined your rss feed and look forward to seeking
more of your great post. Also, I’ve shared your web site in my social networks!
Thank you, I’ve recently been searching for info about this
subject for a long time and yours is the best I have discovered
so far. However, what concerning the conclusion? Are you sure in regards to the source?
Great info. Lucky me I ran across your blog by chance (stumbleupon).
I’ve book marked it for later!
Greetings! Quick question that’s entirely off topic. Do you know how to make
your site mobile friendly? My blog looks weird when browsing from my iphone4.
I’m trying to find a template or plugin that might be able to resolve this problem.
If you have any suggestions, please share.
Appreciate it!
Amazing! Its really remarkable piece of writing, I have got much clear idea about from this piece
of writing.
My brother suggested I might like this website.
He was totally right. This post truly made
my day. You cann’t imagine simply how much time I had spent for
this information! Thanks!
Awesome things here. I am very happy to see your post. Thanks
a lot and I am looking ahead to touch you. Will you please drop me a mail?
Woah! I’m really digging the template/theme of this website.
It’s simple, yet effective. A lot of times it’s very hard to get that
“perfect balance” between usability and appearance. I must say that you’ve done a excellent job with
this. Additionally, the blog loads extremely quick for me on Firefox.
Superb Blog!
Hi everyone, it’s my first go to see at this web page,
and piece of writing is truly fruitful in favor of me, keep up posting these posts.
I used to be able to find good information from your content.
Thanks , I have just been looking for information approximately this subject for a long time and yours
is the greatest I’ve found out so far. However,
what concerning the conclusion? Are you positive about
the supply?
I’ve been browsing on-line greater than three hours these days, but
I by no means found any interesting article like yours. It’s beautiful worth enough for me.
In my opinion, if all webmasters and bloggers made just
right content as you did, the internet will be much more useful than ever before.
If you would like to take a good deal from this post then you have to apply
these techniques to your won web site.
I have read so many articles or reviews about the blogger lovers
but this paragraph is genuinely a nice paragraph, keep it up.
Good article. I certainly love this site. Keep it up!
Why users still use to read news papers when in this technological globe everything is existing on net?
Hi, just wanted to tell you, I liked this post. It
was funny. Keep on posting!
I used to be recommended this website through my cousin.
I’m no longer positive whether this put up is written by
him as nobody else know such special approximately my problem.
You are wonderful! Thank you!
Thanks for your personal marvelous posting! I definitely enjoyed reading it,
you will be a great author. I will make certain to bookmark your blog and will often come back someday.
I want to encourage yourself to continue your great writing, have a nice morning!
of course like your web site however you have to test the spelling on several
of your posts. A number of them are rife with spelling issues and I in finding it very bothersome to tell
the truth nevertheless I will certainly come again again.
An intriguing discussion is definitely worth comment.
I believe that you ought to publish more on this subject, it might not be a taboo matter but generally people don’t discuss these topics.
To the next! All the best!!
These are in fact impressive ideas in on the topic of blogging.
You have touched some pleasant things here.
Any way keep up wrinting.
Hi there, You’ve done an excellent job. I’ll definitely digg it and personally suggest to my friends.
I am confident they’ll be benefited from this web site.
Hi there, I read your blog like every week. Your writing style is witty, keep up the good
work!
Hi, Neat post. There is a problem together with your web site in internet explorer, would test this?
IE still is the marketplace chief and a large element of folks will leave out your excellent writing because of this problem.
I think this is one of the most vital info for me.
And i’m glad reading your article. But want to remark on some general
things, The web site style is great, the articles is really great : D.
Good job, cheers
Hello, i read your blog occasionally and i own a similar one
and i was just curious if you get a lot of spam remarks?
If so how do you prevent it, any plugin or anything you can suggest?
I get so much lately it’s driving me crazy so any support is
very much appreciated.
Hey there are using WordPress for your site platform? I’m new to the blog world
but I’m trying to get started and set up my own. Do
you require any html coding expertise to make your own blog?
Any help would be greatly appreciated!
I read this article completely regarding the comparison of hottest
and preceding technologies, it’s amazing article.
Link exchange is nothing else except it is simply placing the other person’s website link on your page
at proper place and other person will also do similar for you.
you are truly a good webmaster. The site loading pace is
incredible. It kind of feels that you are doing any distinctive trick.
In addition, The contents are masterpiece. you’ve done a
great activity on this matter!
This site was… how do you say it? Relevant!! Finally I have
found something that helped me. Appreciate it!
What’s up mates, how is the whole thing, and what you
would like to say about this paragraph, in my view its actually remarkable in support of me.
Hello, just wanted to mention, I liked this blog post.
It was funny. Keep on posting!
Howdy would you mind letting me know which webhost you’re utilizing?
I’ve loaded your blog in 3 different internet
browsers and I must say this blog loads a lot quicker then most.
Can you suggest a good web hosting provider at a honest price?
Thank you, I appreciate it!
You should be a part of a contest for one of the highest quality blogs online.
I most certainly will recommend this site!
If you are going for finest contents like myself, only pay a visit this web
page every day as it presents feature contents, thanks
Thanks for every other wonderful article. The place else could anyone get that type
of information in such a perfect approach of writing?
I’ve a presentation next week, and I’m on the search for such info.
I pay a quick visit day-to-day a few sites and websites to read content, but
this web site presents quality based posts.
Wow, incredible blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your web site
is fantastic, let alone the content!
I seriously love your blog.. Pleasant colors & theme.
Did you create this website yourself? Please reply back as
I’m wanting to create my own blog and would love to find out where you got this from
or just what the theme is named. Thank you!
Thanks for sharing your thoughts. I truly appreciate your efforts and I am waiting for
your further post thank you once again.
I do not even know how I ended up here, but I thought this
post was good. I do not know who you are but certainly you are going to a
famous blogger if you are not already 😉 Cheers!
What’s up to every body, it’s my first pay a
quick visit of this web site; this webpage carries awesome and really fine material in favor
of readers.
interesting review. Furthermore visit my, personal site to understand agen slot deposit pulsa.
This page has received good reputation together with agen slot pulsa gambling
establishment players in Dalam negeri. There will be various wanted promos if however you join at the moment.
What’s Taking place 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 contribute & assist other customers like its aided me.
Good job.