Commit 21b8f8e3 by BellCodeEditor

save project

parent 6552a101
Showing with 12 additions and 23 deletions
username = "python" # 保存在服务器数据库中的用户账号(正确的账号) import turtle
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
i=3
while True:
i+=0
if i>=0
name=input("账号")
password=input("密码")
# 请用input()实现用户输入账号、密码的功能
if name == username and password == userpassword:
print("正确")
break
if name !=username :
print("错误,用户不存在")
print("还有",i,"次机会")
continue
if password !=userpassword :
i-1
print("错误,密码有误")
print("还有",i,"次机会")
continue
print("欢迎")
pen =turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("black")
colors=["green","red","orange","yellow"]
for i in range(1,300):
pen.pencolor(colors[i%4])
pen.forward(i)
pen.right(91)
turtle.hideturtle()
turtle.done()
\ 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