Commit 9b391f88 by BellCodeEditor

auto save

parent bcfa28b6
Showing with 77 additions and 49 deletions
import turtle
pen=turtle.Pen()
pen1=turtle.Pen()
pen1.fillcolor("blue")
pen1.begin_fill()
pen.up()
pen.goto(-100,100)
pen.down()
for i in range(4):
pen.forward(200)
pen.right(90)
pen.hideturtle()
pen1.up()
pen1.goto(0,-50)
pen1.down()
pen1.circle(50)
pen1.end_fill()
pen1.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.pensize(2)
pen.pencolor("red")
pen.up()
pen.goto(0,-50)
pen.down()
pen.circle(100)
pen.left(90)
pen.forward(200)
pen.left(90)
pen.circle(100,90)
pen.left(90)
pen.forward(200)
pen.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
pen1=turtle.Pen()
pen2=turtle.Pen()
pen2.fillcolor("black")
pen2.
for i in range(4):
pen1.forward(100)
pen1.left(90)
for i in range(4):
pen2.forward(100)
pen2.right(90)
turtle.done()
\ No newline at end of file
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("pink")
b=screen.textinput("提示框","你要多大的爱心?(最大128)")
heartsize=int(b)
pen.speed(0)
pen.pensize(5)
pen.pencolor("red")
pen.fillcolor("red")
pen.begin_fill()
pen.left(45)
pen.forward(heartsize*2)
pen.circle(heartsize,180)
pen.right(90)
pen.circle(heartsize,180)
pen.forward(heartsize)
pen.penup()
pen.goto(100,-100)
pen.write("老师辛苦了,\n谢谢您!",font=("楷书",30,"normal"))
pen.end_fill()
pen.hideturtle()
turtle.done()
\ No newline at end of file
import turtle i=3
pen=turtle.Pen() name_1="陆浩希"
screen=turtle.Screen() password_1="120927"
len=turtle.textinput("提示框","请输入爱心的大小") name_2="陆哥"
heartsize=(int(len)) password_2="134679"
screen.bgcolor("light pink") print("你有3次输入的机会")
pen.speed(1) while True:
pen.pensize(5) if i>0:
pen.pencolor("red") b=input("输入的账号:")
pen.fillcolor("red") a=input("输入的密码:")
pen.begin_fill() i=i-1
pen.left(45) if b==name_1 and a==password_1 or b==name_2 and a==password_2:
pen.forward(2*heartsize) print("登录成功")
pen.circle(heartsize,180) break
pen.right(90) else:
pen.circle(heartsize,180) if b != name_1 and b != name_2:
pen.forward(2*heartsize) print("账号输入错误,请重登")
pen.end_fill() print("你还有"+str(i)+"次输入的机会!")
pen.penup() continue
pen.goto(100,-100) if a != password_1 and a != password_2:
pen.pencolor("black") print("密码输入错误,请重登")
pen.write("老师辛苦了,\n谢谢您!",font=("楷书",55,"normal")) print("你还有"+str(i)+"次输入的机会!")
pen.hideturtle() else:
turtle.done() print("账号被锁定")
\ No newline at end of file exit()
print("欢迎来到希玛编程!")
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