- 创建 .idea 目录和相关配置文件,设置项目结构 - 添加多个课堂成果示例代码,涵盖不同主题和功能 - 创建和配置 .gitignore 文件,忽略特定文件和目录
30 lines
475 B
Python
30 lines
475 B
Python
import turtle as t
|
|
import colorsys
|
|
|
|
# 绘制平行四边形
|
|
def pingxing():
|
|
for j in range(2):
|
|
t.forward(100)
|
|
t.right(60)
|
|
t.forward(200)
|
|
t.right(120)
|
|
|
|
t.tracer(10)
|
|
t.bgcolor('black')
|
|
t.pensize(3)
|
|
h = 0
|
|
|
|
while True:
|
|
c = colorsys.hsv_to_rgb(h,1,1)
|
|
h += 0.005
|
|
if h > 1 :
|
|
h = 0
|
|
t.pencolor(c)
|
|
t.fillcolor('black')
|
|
t.begin_fill()
|
|
pingxing()
|
|
t.end_fill()
|
|
t.right(12)
|
|
|
|
t.done()
|