Commit 018de7c7 by BellCodeEditor

save project

parent d11a0656
Showing with 20 additions and 22 deletions
# 利用write()帮助悟空给诺依回信吧~ i=5
import turtle usernamer="sb"
screen=turtle.Screen() userpasddsword="123456789"
screen.bgcolor("light blue") while True:
len=screen.textinput("100","100") if i>0:
len=int(len) name=input("请输入用户名:")
pen=turtle.Pen() password=input("请输入密码:")
pen.write("你好\nSB.",font=("Times",30,"normal")) i-=1
pen.hideturtle() if usernamer==name and userpassword==password:
len=60 print("登录成功")
pen.penup() break
pen.goto(100,100) if nime!=usernamer:
pen.pendown() print("用户名不正确请重新输入")
pen.pensize(5) continue
pen.pencolor("red") if password!=userpassword:
pen.left(45) continue
pen.forward(2*len) print("密码不正确请重新输入")
pen.circle(len,180) else:
pen.right(90) print("你的账号已锁定,请带身份到我公司解锁")
pen.circle(len,180) print("欢迎来到贝尔编星球")
pen.forward(2*len)
turtle.done()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment