Commit ba49b50e by BellCodeEditor

save project

parent 062682cc
Showing with 18 additions and 14 deletions
import turtle import turtle
for i in range(4): pen=turtle.Pen()
turtle.forward(200) pen.write("天王盖地虎\n你个250",font=("times",40,"normal"))
turtle.left(90) pen.hideturtle()
turtle.penup() turtle.done()
turtle.goto(-40,-10) \ No newline at end of file
turtle.pendown()
r=float(input('圆的半径:')) import turtle
d=r*2 pen=turtle.Pen()
C=3.14*d pen.fillcolor("red")
s=3.14*r*r pen.begin_fill()
print('圆的直径是:%.2f'%d) pen.right(-45)
print('圆的周长是:%.3f'%C) pen.forward(100)
print('圆的面积是:%.1f'%s) pen.circle(50,180)
\ No newline at end of file pen.right(90)
pen.circle(50,180)
pen.forward(100)
pen.end_fill()
turtle.done()
\ 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