How to think like a Computer Scientist: 课后习题第十八章3
来源:互联网 发布:2015年进出口贸易数据 编辑:程序博客网 时间:2024/06/06 04:01
#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 18/09/2013# Copyright: (c) penglaixy 2013# Licence: <your licence>#-------------------------------------------------------------------------------import turtleimport timedef draw_triangle(t, order, size): if order == 0: t.forward(size) t.right(120) t.forward(size) t.right(120) t.forward(size) t.right(120) else: draw_triangle(t,order - 1, size/2) t.forward(size/2) draw_triangle(t,order - 1, size/2) t.right(120) t.forward(size/2) t.left(120) draw_triangle(t,order - 1, size/2) t.left(120) t.forward(size/2) t.right(120)wn = turtle.Screen()wn.bgcolor("green")wn.title("yuxiangyang is testing!")tess = turtle.Turtle()tess.color("navy blue")tess.pensize(4)tess.penup()tess.forward(-100)tess.right(90)tess.forward(100)tess.left(90)tess.pendown()tess.left(60)draw_triangle(tess, 3, 300)time.sleep(10)wn.bye()
- How to think like a Computer Scientist: 课后习题第十八章3
- How to think like a Computer Scientist: 课后习题第十八章1
- How to think like a Computer Scientist: 课后习题第十八章2
- How to think like a Computer Scientist: 课后习题第十八章4
- How to think like a Computer Scientist: 课后习题第十八章5-8
- How to think like a Computer Scientist: 课后习题第十八章9-11
- How to think like a Computer Scientist: 课后习题第九章 第3题
- How to think like a Computer Scientist: 课后习题第十四章2-3
- How to think like a Computer Scientist: 课后习题第十七章3
- How to think like a Computer Scientist: 课后习题第三章 12题
- How to think like a computer scientist: 第四章 课后习题 1
- How to think like a Computer Scientist: 课后习题第四章 2题
- How to think like a computer scientist: 第五章 课后习题 9
- How to think like a computer scientist: 第四章 课后习题 5
- How to think like a Computer Scientist: 课后习题第四章 10
- How to think like a Computer Scientist: 课后习题第六章 1-5
- How to think like a Computer Scientist: 课后习题第六章 6-12
- How to think like a Computer Scientist: 课后习题第六章 13-19
- HDOJ 1520 Anniversary party
- POJ 2446 Chessboard (匈牙利算法)
- Java核心技术,支撑Java程序对外接口的I/O
- LeetCode | Validate Binary Search Tree
- Shiro和AJAX完美整合
- How to think like a Computer Scientist: 课后习题第十八章3
- 网页艺术设计基础
- JSP页面点击“上移下移”链接排序
- cannot be hot swapped into a running virtal machine的解决方法
- 10. 翻转句子中单词的顺序。
- POJ 3007 Organize Your Train part II
- 实模式和保护模式
- 123我们456
- 大数据量生成脚本及导入策略