Commit 9ca3d046 by BellCodeEditor

save project

parent 0b8b0c3e
Showing with 10 additions and 22 deletions
# 利用write()帮助悟空给诺依回信吧~ username = "python" # 保存在服务器数据库中的用户账号(正确的账号)
import turtle userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
screen=turtle.Screen()
screen.bgcolor("light blue") # 请用input()实现用户输入账号、密码的功能
len=screen.textinput("100","100") name=input("请输入用户名")
len=int(len) password=input("请输入密码")
pen=turtle.Pen() # 如果用户输入的账号、密码正确,提示登陆成功
pen.write("你好\nSB.",font=("Times",30,"normal")) if name==username and password==userpassword:
pen.hideturtle() print("登陆成功")
len=60 \ No newline at end of file
pen.penup()
pen.goto(100,100)
pen.pendown()
pen.pensize(5)
pen.pencolor("red")
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
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