Commit 7801a923 by BellCodeEditor

auto save

parent 7909b151
Showing with 27 additions and 7 deletions
# '''''''''''''''''''''''
# 计算长方形的面积并输出结果
# '''''''''''''''''''''''
# a=6
# #长
# b=3
# #宽
# s=a*b
# #面积
# print("长方形的面积为:",s)
# 长方形的面积
import turtle
pen = turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
for i in range(5):
pen.forward(150)
pen.left(144)
pen.end_fill()
t=turtle.Turtle()
t.penup()
t.goto(-100,-100)
t.pendown()
for i in range(4):
t.fd(200)
t.left(90)
t.penup()
t.goto(0,0)
t.dot(20,"red")
t.goto(-40,0)
t.dot(20,"red")
t.goto(40,0)
t.dot(20,"red")
t.hideturtle()
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