Commit 528d26db by BellCodeEditor

save project

parent c74d2d63
Showing with 35 additions and 49 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle
screen=turtle.Screen()
len=screen.textinput("大小","你想要多大的爱心")
size=int(len)
pen=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen.write("你好\n诺依.",font=("Times",30,"normal"))
pen.hideturtle()
pen1=turtle.Pen()
pen.penup()
pen.goto(100,-100)
pen1.left(45)
pen1.forward(size*2)
pen1.circle(size,180)
pen1.right(90)
pen1.circle(size,180)
pen1.forward(size*2)
screen.bgcolor("blue")
turtle.done()
username="python"
userpassword="123456"
while True:
name=input("用户名:")
password=input("密码:")
if username==name and userpassword==password:
print("登录成功")
break
elif username!=name:
print("用户名错误!请重新输入!")
else:
print("密码错误!请重新输入!")
print("欢迎来到贝尔编程")
\ No newline at end of file
i=3
username="python"
userpassword="123456"
while True:
if i>0:
name=input("用户名:")
password=input("密码:")
if username==name and userpassword==password:
print("登录成功")
break
if username!=name:
print("用户名错误!请重新输入!")
continue
if userpassword!=password:
print("密码错误!请重新输入!")
i-=1
else:
print("你的账户已锁定,请来我司解锁。")
exit()
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