Commit cee21cd0 by BellCodeEditor

auto save

parent f2992008
import turtle import turtle
screen=turtle.Screen() t=turtle.Pen()
screen.bgcolor("pink") turtle.screensize(800,600,"white")
pen=turtle.Pen() t.pensize(4)
pen.penup() t.penup()
pen.write("你好\n诺伊.",font=("Times",30,"normal")) t.goto(0,-200)
pen.goto(-100,0) t.pendown()
pen.pensize(5) t.circle(200)
pen.pencolor("red") t.penup()
pen.pendown() t.begin_fill()
pen.left(45) t.goto(-100,50)
pen.forward(100) t.pendown()
pen.circle(50,180) t.circle(20)
pen.right(90) t.fillcolor("blue")
pen.circle(50,180) t.end_fill()
pen.forward(100) t.penup()
pen.hideturtle() t.begin_fill()
turtle.done() t.goto(100,50)
t.pendown()
t.circle(20)
t.fillcolor("blue")
t.end_fill()
t.penup()
t.goto(0,50)
t.pendown()
t.circle(-50,steps=3)
t.penup()
t.goto(-150,-70)
t.pendown()
t.goto(0,-170)
t.goto(150,-70)
turtle.done()
\ No newline at end of file
import turtle
t=turtle.Pen()
turtle.screensize(800,600,"white")
t.pensize(4)
t.penup()
t.goto(-100,-100)
t.right(45)
t.pendown()
t.circle(200,steps=4)
t.begin_fill()
t.penup()
t.goto(-50,20)
t.pendown()
t.circle(10)
t.fillcolor("red")
t.end_fill()
t.hideturtle()
t.penup()
t.begin_fill()
t.goto(20,20)
t.pendown()
t.circle(10)
t.fillcolor("red")
t.end_fill()
t.hideturtle()
t.penup()
t.begin_fill()
t.hideturtle()
t.goto(90,20)
t.pendown()
t.circle(10)
t.fillcolor("red")
t.end_fill()
t.penup()
turtle.done()
t=int(input("请输入圆的半径"))
b=2*3.14*t
c=3.14**2
d=t*2
b=round(b,2)
c=round(c,2)
d=round(d,2)
print("圆的直径是:",t,"\n","圆的周长是:",b,"\n","圆的面积为:",c,)
\ No newline at end of file
a=6#a变量代表长方形的长,设置长方形的长是6
b=3#b变量代表长方形的宽,设置长方形的宽是3
s=(a+b)*2#s变量代表长方形的面积
print("长方形的面积为:",s)#输出长方形的面积
import turtle
t=turtle.Pen()
turtle.screensize(800,600,"white")
t.pensize(2)
t.penup()
t.goto(-100,-100)
t.pendown()
t.forward(200)
t.left(90)
t.forward(200)
t.left(90)
t.forward(200)
t.left(90)
t.forward(200)
t.penup()
t.goto(-50,0)
t.pendown()
t.begin_fill()
t.circle(50)
t.fillcolor("blue")
t.end_fill()
turtle.done()
import turtle
t=turtle.Pen()
turtle.screensize(800,600,"white")
t.pensize(4)
t.pencolor("purple")
t.begin_fill()
t.penup()
t.goto(0,-50)
t.pensize(5)
t.pendown()
t.left(45)
t.forward(100)
t.circle(50,180)
t.right(90)
t.circle(50,180)
t.forward(100)
t.fillcolor("purple")
t.end_fill()
import turtle
t=turtle.Pen()
turtle.screensize(800,600,"white")
t.pensize(4)
t.penup()
t.goto(-40,-40)
t.pendown()
t.circle(40)
t.penup()
t.goto(-40,40)
t.pendown()
t.circle(40)
t.penup()
t.goto(-40,40)
t.pendown()
t.forward(80)
t.penup()
t.goto(40,40)
t.pendown()
t.circle(40)
t.penup()
t.goto(40,-40)
t.pendown()
t.circle(40)
turtle.done()
import turtle
t=turtle.Pen()
turtle.screensize(800,600,"white")
t.pensize(4)
t.begin_fill()
t.left(180)
t.penup()
t.goto(0,160)
t.pendown()
t.circle(200,steps=3)
t.fillcolor("blue")
t.end_fill()
t.penup()
t.begin_fill()
t.goto(0,100)
t.pendown()
t.circle(130,steps=3)
t.fillcolor("yellow")
t.end_fill()
t.penup()
t.begin_fill()
t.goto(0,50)
t.pendown()
t.circle(70,steps=3)
t.fillcolor("red")
t.end_fill()
t.penup()
turtle.done()
\ No newline at end of file
import turtle
t=int(input("请输入一个三位数"))
u=t//100
y=(t-u*100)//10
d=t%10
print("百:",u,"十:",y,"个:",d)
\ 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