一个有意思的搞笑小错误,而且需要的代码也很少import turtle as t #导入turtle 模块from random import choice #导入choice模块def gaoxiao(): c=input("请输入密码:") if c == "123456": print("正确") else: for n in range(100): t.bgcolor("blue") #画布颜色 t.color("red") #画笔颜色 t.speed(500) #画笔速度 x = list(range(-800, 800)) y = list(range(-400, 400)) x1 = choice(x) #设置随机坐标 y1 = choice(y) t.penup() t.goto(x1,y1) for i in range(1) : t.pendown() m=list(range(10,50)) m1=choice(m) t.write("错误",font=("隶书",m1)) # 设置字体格式 t.hideturtle() t.done()gaoxiao() #调用