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

Write a function that takes a string as an argument and prints out the string in large letters.

def setup():
    word = input("")
    draw(word)

def draw(word):
    Bl1 = " #####  "
    Bl2 = " #    # "
    Bl3 = " #####  "
    Bl4 = " #    # "
    Bl5 = " #####  "
    B = [Bl1,Bl2,Bl3,Bl4,Bl5]
    Ll1 = " #      "
    Ll2 = " #      "
    Ll3 = " #      "
    Ll4 = " #      "
    Ll5 = " ###### "
    L = [Ll1,Ll2,Ll3,Ll4,Ll5]
    Ul1 = " #    # "
    Ul2 = " #    # "
    Ul3 = " #    # "
    Ul4 = " #    # "
    Ul5 = "  ####  "
    U = [Ul1,Ul2,Ul3,Ul4,Ul5]
    El1 = " ###### "
    El2 = " #      "
    El3 = " ###### "
    El4 = " #      "
    El5 = " ###### "
    E = [El1,El2,El3,El4,El5]
    ip = 0
    while(ip < 5):
        iw = 0
        while(iw < len(word)):
            if(word[iw] == "B"):
                print(B[ip],end = "")
            elif(word[iw] == "L"):
                print(L[ip],end = "")
            elif(word[iw] == "U"):
                print(U[ip],end = "")
            elif(word[iw] == "E"):
                print(E[ip],end = "")
            iw += 1
        print()  
        ip += 1  
                                     
setup()

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

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

Link Video Presentation Resort Managemant System Project.

Video Presentation Resort Managemant System Project. จัดทำโดย พากษ์เสียง: คุณาสิน  ทองมณี  5801012620011 ลำดับภาพ: สุพิชชา  ศรีศิริ...