Posted by : Unknown Rabu, 27 November 2013

 nich....ane kasih scripnya.......

nilai=input("Masukan Nilai {maksimal 4 digit}=  ")
g=nilai/10**6
f=(nilai%10**6)/10**4
n=4
while n>=0:
    a=nilai/10**n
    if a==1:
        a="satu"
    if a==2:
        a="dua"
    if a==3:
        a="tiga"
    if a==4:
        a="empat"
    if a==5:
        a="lima"
    if a==6:
        a="enam"
    if a==7:
        a="tujuh"
    if a==8:
        a="delapan"
    if a==9:
        a="sembilan"
    if n==3:
        if a>0:
            print a,"ribu",
        else:
            if f>0:
                print 'ribu',        
    if n==2:
        if a>0:
            print a,"ratus",
    if n==1:
        if a>0:
            print a,"puluh",
    if n==0:
        if a>0:
            print a,
    nilai=nilai%10**n
    n=n-1

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Popular Post

Blogger templates

Pages

Diberdayakan oleh Blogger.

Blogger news

Blogger templates

- Copyright © Python Programing -Robotic Notes- Powered by Blogger - Designed by Johanes Djogan -