Commit 7d5ee3fa by BellCodeEditor

save project

parent 88c6055b
Showing with 15 additions and 37 deletions
# 利用write()
import turtle
screen=turtle.Screen()
pen1=turtle.Pen()
screen.bgcolor("gold")
# creen=tusrtle.Screen()
# screen.bgcolor("light blue")
# len=screen.textinput("100","100")
# len=int(len)
# pen=turtle.Pen()
# pen.write("你好\n诺依\春眠不觉晓",font=("Times",30,"normal"))
# pen.hideturtle()
a=screen.textinput("设置大小","大小")
b=int(a)
len=60
pen1.penup()
pen1.goto(100,100)
pen1.down()
pen1.pensize(5)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*b)
pen1.circle(b,180)
pen1.right(90)
pen1.circle(b,180)
pen1.forward(2*b)
turtle.done()
username="小米"
userpassword="1234"
name=input("请输入用户名")
password=input("请输入密码")
while True:
if username==name and userpassword==password:
print("登录成功")
break
print("登陆失败,账户或密码错误")
if username!=name:
print("该账户不存在")
pen1.pencolor("red")
pen1.pensize(5)
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
turtle.done()
if userpassword!=password:
print("密码错误")
print("欢迎来到贝尔乐园")
\ 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