Commit 3848dd1f by BellCodeEditor

save project

parent 1bf4da97
Showing with 40 additions and 9 deletions
username = "python" import turtle
userpassword = "123456" 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: while True:
name = input("请输入用户名:") if i>0:
password = input("请输入密码:") i=i-1
if name == username and password == userpassword: name=screen.textinput("输入框","姓名")
print("登录成功!")
print("用户名和密码错误!请重新输入") if name!=username:
print("欢迎来到贝尔编程!") pen.goto(-30,-100)
\ No newline at end of file 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