这个作业属于哪个课程 | https://www.icourse163.org/learn/BIT-268001?tid=1450323450#/learn/content |
---|---|
这个作业要求在哪里 | https://edu.cnblogs.com/campus/fzzcxy/Freshman/homework/11187 |
这个作业的目标 | ✔学会使用python编写脚本 |
* 前言(鄙人写代码能力弱,勿喷 !QAQ!)
由于python环境在很早之前安装过了,所以对于搭建流程就不再叙述了
* GitHub仓库地址
* 上课笔记
1.笔记截图
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200911164838573-635808260.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200911165027577-53616859.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912180448460-872593220.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913144805585-1165242702.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145008117-1776427334.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145119132-1562816205.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145227285-1858381295.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145427160-2054108395.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912180506186-740908297.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912210914135-994081854.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912211033024-1328873639.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912211746303-553025643.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912214842276-199656818.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912214918876-581336260.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912215903044-1962193103.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912221523741-1144308228.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912221738966-310303318.png)
1.笔记截图
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200911164838573-635808260.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200911165027577-53616859.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912180448460-872593220.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913144805585-1165242702.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145008117-1776427334.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145119132-1562816205.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145227285-1858381295.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200913145427160-2054108395.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912180506186-740908297.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912210914135-994081854.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912211033024-1328873639.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912211746303-553025643.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912214842276-199656818.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912214918876-581336260.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912215903044-1962193103.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912221523741-1144308228.png)
![](https://img2020.cnblogs.com/blog/2148400/202009/2148400-20200912221738966-310303318.png)
* 2.关于画笔的函数
函数 | 描述 |
---|---|
pendown() | 放下画笔 |
penup() | 提起画笔 |
pensize(width) | 画笔宽度 |
pencolor() | 画笔颜色 |
hideturtle() | 隐藏画笔 |
showturtle() | 显示画笔 |
forward() | 前进 |
backward() | 后退 |
right(angle) | 向右旋转angle角度 |
left(angle) | 向左旋转angle角度 |
goto(x,y) | 移动到绝对坐标(x,y)处 |
setx( ) | 将当前x轴移动到指定位置 |
sety( ) | 将当前y轴移动到指定位置 |
setheading(angle) | 设置当前朝向为angle角度 |
home() | 设置当前画笔位置为原点,朝向东。 |
circle(radius,e) | 绘制一个指定半径r和角度e的圆或弧形 |
dot(r,color) | 绘制一个指定半径r和颜色color的圆点 |
undo() | 撤销画笔最后一步动作 |
speed() | 设置画笔的绘制速度,参数为0-10之间 |
* 学习感言
之前对 python 只是稍有了解,只懂得中英文字符的区别以及能看懂些简单代码。
遇到的困难就是最后动手画旋转图的时候弄了好久~~~然后就面向百度查阅了点资料。
经过这次对于 python 的学习(除了看网课,还在一些博客补充了些知识点),我对 python 有了进一步的了解且懂得了如何利用 turtle库 去编写一些代码.
希望我在将来能够掌握好 python 语言并能利用 python 写出一些利于自身方面发展的脚本。 我还是太菜了(,,•́ . •̀,,)