用python海龟画一个三角形
import turtle
def draw_triangle(side_length):#triangle def
for x in range (3):
turtle. left(120)
turtle. forward(side_length)
return None
def jump(distance):#jump definition
turtle. penup()
turtle. forward(distance)
turtle. pendown()
return None
def color_triangle(side_length, color):#makes the triangle color filled
turtle. fillcolor()
turtle. begin_fill()
draw_triangle(size)
turtle. end_fill()
return None
color_a= input("choose a color for the first triangle ")
color_b= input ("choose a color for the second triangle ")
color_c= input("choose a color for the third triangle ")
back_color= input ("choose a color for the backround ")
my_colors= []
if color_a not in my_colors:
my_colors . append (color_a)
if color_b not in my_colors:
my_co
相关知识
简笔画之如何画一个礼物盒
海龟简笔画带颜色 海龟怎么画可爱
wow猎人海龟
海龟
科普知识:绿海龟:大海中的爬行动物
用python写个桌面挂件
3. 用Python进行图像处理 — Python 3 教程 文档
Python———面向对象编程
猫咪简笔画怎么画
【动物】绘画教程,画一只可爱的小守宫。
网址: 用python海龟画一个三角形 https://www.mcbbbk.com/newsview605281.html
上一篇: 本报记者探访宠物市场 揭秘西安另 |
下一篇: 江西南丰县自发组建甲鱼交易市场 |
推荐分享

- 1我的狗老公李淑敏33——如何 5096
- 2南京宠物粮食薄荷饼宠物食品包 4363
- 3家养水獭多少钱一只正常 3825
- 4豆柴犬为什么不建议养?可爱的 3668
- 5自制狗狗辅食:棉花面纱犬的美 3615
- 6狗交配为什么会锁住?从狗狗生 3601
- 7广州哪里卖宠物猫狗的选择性多 3535
- 8湖南隆飞尔动物药业有限公司宠 3477
- 9黄金蟒的价格 3396
- 10益和 MATCHWELL 狗 3352