用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养玉米蛇的危害 33026
- 2原创 ... 10444
- 3猫咪声音翻译器 9482
- 4狗交配为什么会锁住?从狗狗生... 8959
- 5petpet generat... 7896
- 6我的狗老公李淑敏33——如何... 7839
- 7甜蜜的宠物我是看守专用宠物之... 6469
- 8中国境内禁养的十大鸟种,你知... 6355
- 9家养水獭多少钱一只正常 5759
- 10自制狗狗辅食:棉花面纱犬的美... 5754




