Commit 6b60de5d by BellCodeEditor

auto save

parent 0406bc0d
Showing with 19 additions and 5 deletions
import turtle
pen=turtle.Pen()
pen.write("天王盖地虎\n你个250",font=("times",40,"normal"))
pen.hideturtle()
turtle.done()
\ No newline at end of file
for i in range(4):
turtle.forward(200)
turtle.left(90)
turtle.penup()
turtle.goto(-40,-10)
turtle.pendown()
a=6#长方形的长
b=3#长方形的宽
s=a*b#长方形的面积=长*宽
print('长方形的面积为:',s)
\ No newline at end of file
r=float(input('圆的半径:'))
d=r*2
C=3.14*d
s=3.14*r*r
print('圆的直径是:%.2f'%d)
print('圆的周长是:%.3f'%C)
print('圆的面积是:%.1f'%s)
\ 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