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
import random
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# print(1 and 0)
# print(0 and 1)
# print(1 and 2)
# print(1 and 1)
# print(2 and 3 and 1)
def tree(n):
if n>=13:
length=random.random(10,30)
pen.pensize(n/10)
pen.color('sienna')
pen.forward(n)
pen.right(30)
tree(n/2)
pen.left(30)
pen.left(30)
tree(n/2)
pen.right(30)
pen.backward(n)
else:
pen.pencolor("snow")
pen.pensize(n/3)
# 移动到起点
pen.left(90)
pen.backward(100)
tree(100)
turtle.done()
# print(1 or 0)
# print(0 or 1)
# print(1 or 2)
# print(2 or 1)
# print(1 or 2 or 3)
# print(6>8 or '121'>'12' and 1)
print('121'>'n')
print('121'>'9')
print(3 > 2 or 4 < 5)
\ No newline at end of file
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