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 import turtle
pen = turtle.Pen() t=turtle.Turtle()
pen.fillcolor("red") t.penup()
pen.begin_fill() t.goto(-100,-100)
for i in range(5): t.pendown()
pen.forward(150) for i in range(4):
pen.left(144) t.fd(200)
pen.end_fill() 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() 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