python 考试大题预测
2022/7/1 1:19:27
本文主要是介绍python 考试大题预测,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
#第一关绘制等边三角形 #********* Begin *********# import turtle as tl tl.pencolor('red') tl.pendown() tl.left(60) tl.forward(200) tl.right(120) tl.forward(200) tl.right(120) tl.forward(200) #********* End *********# #保存屏幕图片 ts = tl.getscreen() ts.getcanvas().postscript(file="Python/src1/py1-1/yourimg/sj.ps") #第二关绘制两个叠加的等边三角形 #********* Begin *********# import turtle as tl tl.pencolor('red') tl.pendown() tl.left(60) tl.forward(200) tl.right(120) tl.forward(200) tl.right(120) tl.forward(200) tl.begin_fill() tl.right(60) tl.right(120) tl.pencolor('blue') tl.fillcolor('yellow') tl.penup() tl.forward(100) tl.pendown() tl.left(60) tl.forward(100) tl.left(120) tl.forward(100) tl.left(120) tl.forward(100) tl.end_fill() tl.end_fill() #********* End *********# #保存屏幕图片 ts = tl.getscreen() ts.getcanvas().postscript(file="Python/src1/py1-2/yourimg/sj.ps") #第三关 绘制三个叠加的等边三角形 #********* Begin *********# import turtle as tl tl.pencolor('red') tl.pendown() tl.left(60) tl.forward(200) tl.right(120) tl.forward(200) tl.right(120) tl.forward(200) tl.begin_fill() tl.right(60) tl.right(120) tl.pencolor('blue') tl.fillcolor('yellow') tl.penup() tl.forward(100) tl.pendown() tl.left(60) tl.forward(100) tl.left(120) tl.forward(100) tl.left(120) tl.forward(100) tl.end_fill() tl.left(120) tl.forward(50) tl.left(60) tl.begin_fill() tl.pencolor('red') tl.fillcolor('white') tl.forward(50) tl.left(120) tl.forward(50) tl.left(120) tl.forward(50) tl.end_fill() #********* End *********# #保存屏幕图片 ts = tl.getscreen() ts.getcanvas().postscript(file="Python/src1/py1-3/yourimg/sj.ps")
这篇关于python 考试大题预测的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-08有遇到过吗?同样的规则 Excel 中 比Python 结果大
- 2024-03-30开始python成长之路
- 2024-03-29python optparse
- 2024-03-29python map 函数
- 2024-03-20invalid format specifier python
- 2024-03-18pool.map python
- 2024-03-18threads in python
- 2024-03-14python Ai 应用开发基础训练,字符串,字典,文件
- 2024-03-13id3 algorithm python
- 2024-03-13sum array elements python