Senin, 06 Oktober 2014

MEMBUAT SEGITIGA BINTANG MENGGUNAKAN PYTHON

x=input('jumlah bintang yg akan ditampilkan=')
y=0
while x>y:
    y=y+1
    a=0
    while y>a:
        print "*",
        a=a+1
    print ""
while y>0:
    y=y-1
    a=0
    while y>a:
        print "*",
        a=a+1
    print ""

Related Posts:

  • Jadwal Kuliah Jurusan Informatika Senin Ruang Jam KodeMk Matakuliah Pengampu Kelas J0406 1 - 4 TIF30334 Sistem Operasi Hernawan Sulistyanto, S.T, M.T C (3) J0407 1 - 3 TI… Read More
  • HTML Tutorial   Examples in Every Chapter This HTML tutorial contains hundreds of HTML examples. With our online HTML editor, you can edit the HTML, and click on a button to view the result. Example <!DOCTYPE html> <… Read More
  • MEMBUAT SEGITIGA BINTANG MENGGUNAKAN PYTHON x=input('jumlah bintang yg akan ditampilkan=') y=0 while x>y:     y=y+1     a=0     while y>a:         print "*",         a=a+1     print … Read More
  • CSS Tutorial   Examples in Each Chapter This CSS tutorial contains hundreds of CSS examples. With our online editor, you can edit the CSS, and click on a button to view the result. CSS Example body {    backgr… Read More
  • Membuat Objek Persegi dan lingkaran dengan python Sedikit mempelajari Bahasa pemrograman Phyton yang konon katanya mudah untuk dipelajari. Pertama kali kita harus menginstal Python pada komputer, disini kita akan menggunakan Python versi 2.7 yang bisa di download di sini. … Read More

0 komentar:

Posting Komentar