python编写的七夕

 编写了七夕两字:

s = '-'
for j in range(5):
    if j == 0:
        for i in range(100):
            if i < 11:
                print(' ', end='')
            elif i < 16:
                print(s, end='')
            elif i < 95:
                print(' ', end='')
            else:
                print(s, end='')
    elif j == 1:
        for i in range(120):
            if i < 11:
                print(' ', end='')
            elif i < 16:
                print(s, end='')
            elif i < 92:
                print(' ', end='')
            else:
                print(s, end='')
    elif j == 2:
        for i in range(117):
            if i < 11:
                print(' ', end='')
            elif i < 16:
                print(s, end='')
            elif i < 89:
                print(' ', end='')
            else:
                print(s, end='')
    elif j == 3:
        for i in range(120):
            if i < 11:
                print(' ', end='')
            elif i < 16:
                print(s, end='')
            elif i < 86:
                print(' ', end='')
            elif i < 91:
                print(s, end='')
            elif i < 109:
                print(' ', end='')
            elif i < 114:
                print(s, end='')
            else:
                print(' ', end='')
    else:
        for i in range(120):
            if i < 11:
                print(' ', end='')
            elif i < 16:
                print(s, end='')
            elif i < 83:
                print(' ', end='')
            elif i < 111:
                print(s, end='')
            else:
                print(' ', end='')
    print()
for i in range(2):
    if i == 0:
        for j in range(120):
            if j < 35:
                print(s, end='')
            elif j < 80:
                print(' ', end='')
            elif j < 108:
                print(s, end='')
    if i == 1:
        for j in range(120):
            if j < 35:
                print(s, end='')
            elif j < 77:
                print(' ', end='')
            elif j < 82:
                print(s, end='')
            elif j < 100:
                print(' ', end='')
            elif j < 105:
                print(s, end='')
    print()
for j in range(6):
    if j == 0:
        for j in range(120):
            if j < 11:
                print(' ', end='')
            elif 11 <= j < 16:
                print(s, end='')
            elif j < 74:
                print(' ', end='')
            elif j < 79:
                print(s, end='')
            elif j < 97:
                print(' ', end='')
            elif j < 102:
                print(s, end='')
    elif j == 1:
        for j in range(120):
            if j < 11:
                print(' ', end='')
            elif 11 <= j <16:
                print(s, end='')
            elif j < 76:
                print(' ', end='')
            elif j < 94:
                print(' ', end='')
            elif j < 99:
                print(s, end='')

    elif j == 2:
        for i in range(120):
            if i < 11:
                print(" ", end='')
            elif 11 <= i < 16:
                print(s, end="")
            elif 16 <= i < 25:
                print(' ', end='')
            elif 25 <= i < 30:
                print(s, end='')
            elif 30 <= i < 73:
                print(' ', end='')
            elif 73 <= i < 91:
                print(' ', end='')
            elif 91 <= i < 96:
                print(s, end='')
    elif j == 3:
        for i in range(120):
            if i < 11:
                print(" ", end='')
            elif i < 16:
                print(s, end="")
            elif i < 25:
                print(' ', end='')
            elif i < 30:
                print(s, end='')
            elif i < 70:
                print(' ', end='')
            elif i < 88:
                print(' ', end='')
            elif i < 93:
                print(s, end='')

    elif j == 4:
        for i in range(120):
            if i < 11:
                print(' ', end='')
            elif i < 30:
                print(s, end='')
            elif i < 67:
                print(' ', end='')
            elif i < 85:
                print(' ', end='')
            elif i < 90:
                print(s, end='')

    elif j == 5:
        for i in range(120):
            if i < 11:
                print(' ', end='')
            elif i < 30:
                print(s, end='')
            elif i < 64:
                print(' ', end='')
            elif i < 82:
                print(' ', end='')
            elif i < 87:
                print(s, end='')
    print()

 

你可能感兴趣的:(节日)