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
pen=turtle.Pen()
screen=turtle.Screen()
len=turtle.textinput("提示框","请输入爱心的大小")
heartsize=(int(len))
screen.bgcolor("light pink")
pen.speed(1)
pen.pensize(5)
pen.pencolor("red")
pen.fillcolor("red")
pen.begin_fill()
pen.left(45)
pen.forward(2*heartsize)
pen.circle(heartsize,180)
pen.right(90)
pen.circle(heartsize,180)
pen.forward(2*heartsize)
pen.end_fill()
pen.penup()
pen.goto(100,-100)
pen.pencolor("black")
pen.write("老师辛苦了,\n谢谢您!",font=("楷书",55,"normal"))
pen.hideturtle()
turtle.done()
\ No newline at end of file
i=3
name_1="陆浩希"
password_1="120927"
name_2="陆哥"
password_2="134679"
print("你有3次输入的机会")
while True:
if i>0:
b=input("输入的账号:")
a=input("输入的密码:")
i=i-1
if b==name_1 and a==password_1 or b==name_2 and a==password_2:
print("登录成功")
break
else:
if b != name_1 and b != name_2:
print("账号输入错误,请重登")
print("你还有"+str(i)+"次输入的机会!")
continue
if a != password_1 and a != password_2:
print("密码输入错误,请重登")
print("你还有"+str(i)+"次输入的机会!")
else:
print("账号被锁定")
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