猫史档案馆


【Python作品分享】LOGO一枚【作品秀】

用户:AaaaaaaaffAaaaaaaaff查看:1 回复:1 评论:1 创建时间:2020-07-28T14:30:33


【作品展示】

center_image

 

【作品介绍】

简单的LOGO一枚

 

【作品源代码】

from random import*
from os import*
from time import*
import sys
import time
import os

def xz_1(xz_font, a, b):
    for bl in range(len(xz_font)):  # 循环
        if a == True:  # 第一个布尔值如果是1,则逐字输出,如果是0,则直接输出
            if b == True:  # 第二个布尔值如果是1,则输出亮色,如果是0,则输出暗色
                if xz_font[bl] == "1":
                    print("\033[101m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "2":
                    print("\033[102m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "3":
                    print("\033[103m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "4":
                    print("\033[104m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "5":
                    print("\033[105m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "6":
                    print("\033[106m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "7":
                    print("\033[107m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == " ":
                    print("\033[0m ", end="")
                    time.sleep(0.001)
                else:
                    print(zxg_font[x], end="")
                    time.sleep(0.001)
            else:
                if xz_font[bl] == "1":
                    print("\033[41m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "2":
                    print("\033[42m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "3":
                    print("\033[43m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "4":
                    print("\033[44m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "5":
                    print("\033[45m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "6":
                    print("\033[46m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == "7":
                    print("\033[47m ", end="")
                    time.sleep(0.001)
                elif xz_font[bl] == " ":
                    print("\033[0m ", end="")
                    time.sleep(0.001)
                else:
                    print(zxg_font[x], end="")
                    time.sleep(0.001)
        else:
            if b == True:
                if xz_font[bl] == "1":
                    print("\033[101m ", end="")
                elif xz_font[bl] == "2":
                    print("\033[102m ", end="")
                elif xz_font[bl] == "3":
                    print("\033[103m ", end="")
                elif xz_font[bl] == "4":
                    print("\033[104m ", end="")
                elif xz_font[bl] == "5":
                    print("\033[105m ", end="")
                elif xz_font[bl] == "6":
                    print("\033[106m ", end="")
                elif xz_font[bl] == "7":
                    print("\033[107m ", end="")
                elif xz_font[bl] == " ":
                    print("\033[0m ", end="")
                else:
                    print(zxg_font[x], end="")
            else:
                if xz_font[bl] == "1":
                    print("\033[41m ", end="")
                elif xz_font[bl] == "2":
                    print("\033[42m ", end="")
                elif xz_font[bl] == "3":
                    print("\033[43m ", end="")
                elif xz_font[bl] == "4":
                    print("\033[44m ", end="")
                elif xz_font[bl] == "5":
                    print("\033[45m ", end="")
                elif xz_font[bl] == "6":
                    print("\033[46m ", end="")
                elif xz_font[bl] == "7":
                    print("\033[47m ", end="")
                elif xz_font[bl] == " ":
                    print("\033[0m ", end="")
                else:
                    print(zxg_font[x], end="")
    print("\033[0m")


def xz_2(z, x):  
    sleep(z)  # 输入几秒停几秒
    if x == True:  # 布尔值若为1,清屏。否则不清屏
        system("cls")


def xz(text):
    sys.stdout.write("\r " + " " * 60 + "\r")
    sys.stdout.flush()
    for c in text:
        sys.stdout.write(c)
        sys.stdout.flush()
        time.sleep(0.06)
xz_2(0,1)
xz_1("                         11      3      11", 1, 1)
xz_1("                          11    343    11", 1, 1)
xz_1("                           11  34143  11", 1, 1)
xz_1("                            11344744311", 1, 1)
xz_1("                             344717443", 1, 1)
xz_1("                            34477433443", 1, 1)
xz_1("                           3447743477443", 1, 1)
xz_1("                          344774315477443", 1, 1)
xz_1("                         3446喵31115477443", 1, 1)
xz_1("                        3447746111115477443", 1, 1)
xz_1("                         34477461112455443", 1, 1)
xz_1("                          344774612477443", 1, 1)
xz_1("                           3447742477443", 1, 1)
xz_1("                          443442247744344", 1, 1)
xz_1("                         414 344717443 414", 1, 1)
xz_1("                        414   3447443   414", 1, 1)
xz_1("                       414     34143     414", 1, 1)
xz_1("                     4414       343       4144", 1, 1)
xz_1("                     444         3         444", 1, 1)
print("")
print("\033[93m                             星斩工作室")
print("\033[96m                          Star Cut Studio\033[0m")

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
AaaaaaaaffAaaaaaaaff

咦我为什么要导入两次头文件,喵三方库

点赞0


评论