猫史档案馆


这 就是爆肝(doge)

用户:归_8npe归_8npe查看:0 回复:0 评论:0 创建时间:2022-12-21T18:14:56


import turtle import time import random
i=0 print("输入很臭的弹幕有惊喜哦") myscreen = turtle.Screen() myscreen.tracer(0) width = 900 height = 400 myscreen.setup(width, height) print("颜色:(纯色前可加深/浅)黑、白、纯白(勉强看见)、红、深红、浅红、棕、橙、深橙、浅橙、黄、浅黄、深黄、蓝、深蓝、浅蓝、绿、深绿、浅绿、紫、深紫、浅紫 灰、粉") name = myscreen.textinput("昵称", "你的昵称") text = myscreen.textinput("弹幕文字", "请输入弹幕文字") if(text == "114514") or (text == "1919810") or ("田所浩二" in text) or (("哼") and ("啊")) in text: a = 0 print("What a stinking bullet screen!") else: print("Good screen") a = 1 col = myscreen.textinput("弹幕颜色", "请输入弹幕颜色(纯色一个字,变种色两个字),非拥有颜色则默认颜色(黑)") if(col=="黑"): col="black" elif(col=="白"): col="beige" elif(col=="纯白"): col="snow" elif(col=="红"): col="red" elif(col=="深红"): col="darkred" elif(col=="浅红"): col="lightcoral" elif(col=="橙"): col="orange" elif(col=="棕"): col="brown" elif(col=="深橙"): col="darkorange" elif(col == "浅橙"): col = "coral" elif(col == "黄"): col="yellow" elif(col=="浅黄"): col="gold" elif(col=="深黄"): col="darkorange" elif(col=="蓝"): col="blue" elif(col=="深蓝"): col="mediumblue" elif(col=="浅蓝"): col="skyblue" elif(col=="绿"): col="green" elif(col=="深绿"): col="forestgreen" elif(col=="浅绿"): col="springgreen" elif(col=="青"): col="cyan" elif(col=="紫"): col="purple" elif(col=="深紫"): col="darkviolet" elif(col=="浅紫"): col="mediumpurple" elif(col=="灰"): col="gray" elif(col=="粉"): col="pink" else: print("无此颜色,转黑色") col="black" contect = "{}:{}".format(name, text) mypen = turtle.Pen() mypen.hideturtle() mypen.pencolor(col) mypen.penup() mypen.goto(width/2, 0) mypen.pendown() # 例:mypen.write("名字:内容", font=("文泉驿正黑", 50)) if(a==0): c = myscreen.textinput("(悲)、(喜)", "悲还是喜?") if(c == "悲"): print("臭罢(悲)") c="悲" elif(c=="喜"): print("臭罢(喜)") c = "喜" else: z = random.randint(1, 2) if(z == 1): print("你不臭!直接把你撅一顿,让你悲!(悲)") c = "悲" if(z==2): print("让你强颜欢笑!(喜)") c="喜" c = "({})".format(c) print("请回到画图板看成品🙏 👍 ")
while i < width*2: if(a == 0): b = "{}{}".format(contect, c) mypen.write(b, font=("文泉驿正黑", 50)) mypen.clear() mypen.backward(1) time.sleep(0.01) i = i + 1 else: mypen.write(contect, font=("文泉驿正黑", 50)) mypen.clear() mypen.backward(1) time.sleep(0.01) i = i + 1


turtle.done()


回复

上一页1 页 / 共 0下一页