Commit 7288a8b5 by BellCodeEditor

save project

parent 13c6e004
Showing with 10 additions and 18 deletions
import turtle #引用海龟
t = turtle.Turtle()
distance = 1
for i in range(300):
t.forward(distance)
t.left(91)
distance+=1
turtle.done()
\ No newline at end of file
username = "python"
userpassword = "123456"
while True:
name = input("请输入用户名:")
password = input("请输入密码:")
if name == username and password == userpassword:
print("登录成功!")
if username != name:
print("用户名错误")
print("你还有"+str(i)+"次机会")
continue
if userpassword != password:
print("密码错误")
print("你还有"+str(i)+"次机会")
else:
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