Commit 9622a2d4 by BellCodeEditor

save project

parent 4a60504c
Showing with 17 additions and 23 deletions
i=3 """
username = "python" 使用turtle模块画图
userpassword = "123456" 每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
while True: """
if i>0: import turtle
name = input("请输入用户名:")
password = input("请输入密码:") pen = turtle.Pen()
i-=1 # 请创造师在下面接着创作
if name == username and password == userpassword: distance=1
print("登录成功!") for i in range(300):
break pen.forward(distance)
if name!=username: distance+=1
print("用户不存在,请重新输入") pen.right(91)
print("温馨提示,您还有"+str(i)+"次登录机会") # 隐藏画笔,保存画布
continue pen.hideturtle()
if password!=userpassword:: turtle.done()
print("用户密码输入错误,请重新输入") \ No newline at end of file
print("温馨提示,您还有"+str(i)+"次登录机会")
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