Commit b3a36908 by BellCodeEditor

save project

parent 5c9b87bd
Showing with 41 additions and 0 deletions
import turtle
import time
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("sky blue")
pen.penup()
pen.color("blue")
username="2"
userpassword="123"
i=3
while True:
if i>0:
i=i-1
name=screen.textinput("输入框","姓名")
if name!=username:
pen.goto(-30,-100)
pen.write("登录错误\n姓名错误",font=("Times",30,"normal"))
time.sleep(1)
pen.clear()
continue
password=screen.textinput("输入框","请输入密码")
if password!=userpassword:
pen.goto(-30,-100)
pen.write("登录错误\n密码错误",font=("Times",30,"normal"))
time.sleep(1)
pen.clear()
continue
if name==username and password==userpassword:
pen.goto(-30,-100)
pen.write("登录成功",font=("Times",50,"normal"))
time.sleep(1)
pen.clear()
break
else:
pen.write("你的账号已经被封锁,\n请明年在来m_m ",font=("Times",30,"normal"))
pen.goto(-100,-100)
time.sleep(1)
pen.clear()
pen.write("欢迎登陆系统",font=("Times",50,"normal"))
\ No newline at end of file
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