วันจันทร์ที่ 19 ตุลาคม พ.ศ. 2558

Lab06 : String Text

def setup():
    text=input("input text:")
    display_string(text)
def display_string(a):
    a1=" ##   "
    a2="#  #  "
    a3="####  "
    a4="#  #  "
    a5="#  #  "
    A=[a1,a2,a3,a4,a5]
    e1="####  "
    e2="#     "
    e3="####  "
    e4="#     "
    e5="####  "
    E=[ e1, e2, e3, e4, e5]
    c1="####  "
    c2="#     "
    c3="#     "
    c4="#     "
    c5="####  "
    C=[ c1, c2, c3, c4, c5]
    s1="####  "
    s2="#     "
    s3="####  "
    s4="   #  "
    s5="####  "
    S=[ s1, s2, s3, s4, s5]
    j=0
    while j<5:
        i=0
        while i<len(a):
            if a[i]=="A":
                print(A[j],end='')
            if a[i]=="E":
                print(E[j],end='')
            if a[i]=="C":
                print(C[j],end='')
            if a[i]=="S":
                print(S[j],end='')
            i+=1
        print()
        j+=1
setup()

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

commit เพิ่มเติม : เพื่ม userstory, bookmark

>>  add userstory ทำการเพิ่ม userstory ใน functional tests >>  add bookmark for user เพิ่มระบบ Bookmark โดยการสร้าง model ขึ...