Commit b6e4b347 by BellCodeEditor

save project

parent 641eec4b
Showing with 21 additions and 22 deletions
i=3 import turtle
username="python" pen=turtle.Pen()
userpasswork="121200" pen.write("从明天起,做一个幸福的人\n喂马、劈柴,周游世界\n从明天起,关心粮食和蔬菜\n我有一所房子,面朝大海,春暖花开\n从明天起,和每一个亲人通信\n告诉他们我的幸福\n那幸福的闪电告诉我的\n我将告诉每一个人\n给每一条河每一座山取一个温暖的名字\n陌生人,我也为你祝福\n愿你有一个灿烂的前程\n愿你有情人终成眷属\n愿你在尘世获得幸福\n我只愿面朝大海,春暖花开。",font=("times",10,"normal"))
while True: pen.hideturtle()
if i>0: pen1=turtle.Pen()
name=input("请输入用户名") pen1.penup()
passwork=input("请输密码") pen1.goto(0,-180)
i-=1 pen1.pendown()
if name==username and passwork ==userpasswork: pen1.pencolor("orange")
print("登陆成功") pen1.pensize(10)
break pen1.left(45)
if name !=username: pen1.forward(100)
print("用户名错误,重新输入") pen1.circle(50,180)
print("温馨提示:你还有"+str(i)+"次机会") pen1.right(90)
continue pen1.circle(50,180)
if passwork !=usernpasswork: pen1.forward(100)
print("密码错误,重新输入") screen=turtle.Screen()
print("温馨提示:你还有"+str(i)+"次机会") screen.bgcolor("lightyellow")
else turtle.done()
print("你没了")
exit()
\ 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