Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-25-2013, 02:07 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › Python v
« Previous 1 2 3 4 Next »

[logic] Triangle

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
[logic] Triangle
02-19-2012, 08:34 AM (This post was last modified: 02-19-2012 08:38 AM by kiddies.)
Post: #1
kiddies Away
Administrator
*******
Administrators
Posts: 1,224
Joined: Dec 2009
Reputation: 40
[logic] Triangle
ok kawan kawan sudah lama yah gak posting disini...kangen deh rasanya.

ini ada sedikit logik ajah yups dulu sekali waktu belajar python, bikin segittiga

biasanya segitiganya kaya gini

*
**
***
****
*****
.
.
.
n

nah sekarang kita mau buat segitiga sama sisi
ok sebenernya sangatlah mudah, kita pake konsep triangle yang dari bhesar ke kecil
n
.
.
.
******
*****
****
***
**
*

nah sourceny kita gabungin ajah..like this
Code:
#!/usr/bin/python
k = 1
while(k<=5):
    print " " * (6 - k), " " * k
    k +=1

ok coba di run dah....

ok case study hari ini selesai...coba kalian buat segitiga sama sisi tapi yang lancipnya di bawah

hayo hayo...
Find all posts by this user
Quote this message in a reply
 Reputed by :  tabun(+1)
02-19-2012, 08:43 AM
Post: #2
Super Moderator Offline
Wahyu Adi Prasetyo
****
Global Moderators
Posts: 6,956
Joined: Jan 2010
Reputation: 237
RE: [logic] Triangle
keren kk python ya
program heker ini smangat
Visit this user's website Find all posts by this user
Quote this message in a reply
02-19-2012, 10:28 PM
Post: #3
assala Away
Stay Cool and Be Positive ;)
**
Moderators
Posts: 2,202
Joined: Jan 2010
Reputation: 41
RE: [logic] Triangle
logicnya ngerti, tp pythonnya blom ngerti kesel :hmm

source code yang di atas buat yang lancip di atas apa di bawah om??
Find all posts by this user
Quote this message in a reply
02-20-2012, 12:39 AM
Post: #4
ketek Offline
bocah ingusan
*******
Administrators
Posts: 2,180
Joined: Jan 2010
Reputation: 384
RE: [logic] Triangle
mantap ne om kiddies mantap

btw ane kok gak keluar apa-apa ya? belajar belajar
[Image: 18bvwy.jpg]
Find all posts by this user
Quote this message in a reply
02-20-2012, 12:45 AM
Post: #5
ditatompel Offline
Administrator
*******
Administrators
Posts: 2,168
Joined: Dec 2010
Reputation: 367
RE: [logic] Triangle
Klo Ane coba quiznya om kiddies, biar segitiganya runcing kebawah gimana ya? bingung

[Image: segitiga.png]
Code:
#!/usr/bin/python
k = 1
o = 8
kosong = " "
print kosong * (o + 1) + "*"
while(k<=o):
    print " " * (o + 1 - k), "*" * k * 2
    k +=1
Find all posts by this user
Quote this message in a reply
02-22-2012, 08:49 AM
Post: #6
kiddies Away
Administrator
*******
Administrators
Posts: 1,224
Joined: Dec 2009
Reputation: 40
RE: [logic] Triangle
kwkwkw...salah ketik ini...kurang tanda bintangnya...makasih yah bro ditatomple..hahaha..sorry...this my mistake...
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-25-2013, 02:07 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE