Commit 3c0f9c20 by BellCodeEditor

auto save

parent 76df6f84
Showing with 20 additions and 26 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
userpassword = "123456"
import turtle import turtle
turtle.hideturtle() s=turtle.Screen()
turtle.goto(0,0) s.bgcolor("light blue")
screen=turtle.Screen()
screen.bgcolor("white")
name=turtle.textinput("登陆验证","请输入账号昵称:")
password=turtle.textinput("登陆验证","请输入该账号密码:")
if name==username and password==userpassword:
turtle.write("登陆成功",font=("Times",15,"normal"))
break
turtle.write("登陆失败",font=("Times",15,"normal"))
name=turtle.textinput("登陆验证","请输入账号昵称:")
password=turtle.textinput("登陆验证","请输入该账号密码:")
screen.clear()
if name==username and password==userpassword:
turtle.write("登陆成功",font=("Times",15,"normal"))
else:
turtle.write("登陆失败",font=("Times",15,"normal"))
turtle.hideturtle()
turtle.done()
# 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("12345上山打老虎",font=("Times",20,"normal"))
pen.hideturtle()
a=turtle.Pen()
a.pencolor("red")
a.pensize(5)
m=s.textinput("提示","你想要多大的爱心呀?")
l=int(m)
a.left(45)
# 如果用户输入的账号、密码正确,提示登陆成功 a.forward(2*l)
\ No newline at end of file a.circle(l,180)
a.right(90)
a.circle(l,180)
a.forward(2*l)
a.hideturtle()
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