Commit 0121a3e2 by BellCodeEditor

save project

parent 6548953d
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("pink")
pen.write("你好",font=("Times",20,"normal"))
pen.up()
pen.goto(200,-100)
pen.color("red")
len=screen.textinput("提示","你要多大的爱心:")
len=int(len)
pen.fillcolor("red")
pen.begin_fill()
pen.down()
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.left(270)
pen.circle(len,180)
pen.forward(2*len)
pen.end_fill()
pen.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
turtle.circle(40)
turtle.circle(-40)
turtle.forward(80)
turtle.circle(40)
turtle.circle(-40)
turtle.done()
\ No newline at end of file
a=input("请输入爸爸身高:")
b=input("请输入妈妈身高:")
c=input("请输入孩子性别:")
a=float(a)
b=float(b)
e=float(e)
d=(a+b+13*e)
print("孩子未来的身高:",d,"(厘米)")
\ No newline at end of file
sum=0
fo
for i in range(k):
sum=sum+i
print(sum)
\ No newline at end of file
i=3
a="a"
b="123456"
while True:
if i>0:
name=input("你的名字是:")
password=input("请输入密码:")
i-=1
if a==name and b==password:
print('登录成功')
break
if a!=name:
print("登录失败,名字错误")
print("登录失败,你还剩"+str(i)+"次机会")
continue
if b!=password:
print("登录失败,密码错误")
print("登录失败,你还剩"+str(i)+"次机会")
else:
print("失败")
exit()
\ No newline at end of file
import turtle # print(1 and 0)
import random # print(0 and 1)
pen = turtle.Turtle() # print(1 and 2)
pen.color('sienna') # print(1 and 1)
# 画布大小 # print(2 and 3 and 1)
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
def tree(n):
if n>=13:
length=random.random(10,30) # print(1 or 0)
pen.pensize(n/10) # print(0 or 1)
pen.color('sienna') # print(1 or 2)
pen.forward(n) # print(2 or 1)
pen.right(30) # print(1 or 2 or 3)
tree(n/2) # print(6>8 or '121'>'12' and 1)
pen.left(30)
pen.left(30) print('121'>'n')
tree(n/2) print('121'>'9')
pen.right(30)
pen.backward(n) print(3 > 2 or 4 < 5)
else: \ No newline at end of file
pen.pencolor("snow")
pen.pensize(n/3)
# 移动到起点
pen.left(90)
pen.backward(100)
tree(100)
turtle.done()
print(hello,word)
\ 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