Commit 5aeca617 by BellCodeEditor

save project

parent 81e44430
Showing with 23 additions and 53 deletions
# import turtle
# pen=turtle.Pen()
# pen.pensize(5)
# pen.pencolor("brown")
# pen.left(45)
# pen.forward(100)
# pen.left(90)
# pen.circle(50,180)
# pen.left(180)
# pen.forward(100)
# pen.right(90)
# pen.circle(-50,180)
# turtle.done()
import turtle
a=turtle.Pen()
a.pensize(5)
a.penup()
a.goto(-100,0)
a.pendown()
a.pencolor("blue")
a.circle(50)
a.penup()
a.goto(0,0)
a.pendown()
a.pencolor("black")
a.circle(50)
a.penup()
a.goto(100,0)
a.pendown()
a.pencolor("red")
a.circle(50)
a.penup()
a.goto(-50,-75)
a.pendown()
a.pencolor("yellow")
a.circle(50)
a.penup()
a.goto(50,-75)
a.pendown()
a.pencolor("light green")
a.circle(50)
turtle.done()
\ No newline at end of file
import turtle
a=turtle.Pen()
b=turtle.Screen()
b.bgcolor("red")
a.pencolor("yellow")
c=b.textinput("提示","新年祝福语")
a.write(c,font=("Times",50,"normal"))
turtle.done()
\ No newline at end of file
i=5
username="ABC"
userpassword="11445"
while True:
if i>0:
name=input("请输入账号:")
password=input("请输入密码:")
i-=1
if username==name and userpassword==password:
print("登录成功!")
break
if name!=username:
print("登录失败!请重新输入账号!")
print("你还有"+str(i)+"次机会")
continue
if password!=userpassword:
print("登录失败!请重新输入密码!")
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