Python二级练习:turtle库(绘制五角星、七彩圆圈)
Python二级练习:turtle库(绘制五角星、七彩圆圈)
from turtle import *
color('red','red')
begin_fill()
for i in range(5):fd(200)rt(144)
end_fill()
done()
import turtleturtle.fd(-200) # 向左
turtle.right(90) # 角度
turtle.circle(100) # 半径
import turtlecolors = ['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'purple']
for i in range(7):c = colors[i]turtle.color(c, c)turtle.begin_fill()turtle.rt(360 / 7)turtle.circle(50)turtle.end_fill()
turtle.done()
最新文章
- Driller源码阅读笔记(二)
- win rar如何注册破解
- 大型高并发高负载网站的系统架构[转载]
- json php 传输,使用JSON实现数据的跨域传输的php代码
- 10款可视化大屏特效,酷炫又内涵!
- 强力删除顽固文件夹
- 强力删除各种文件夹
- 职场经验(转载)
- 数字集成电路(中)
- Specification 参数的用法
- ext3文件系统基础
- Ext 4 概述(一)
- 惊!c语言上机编程题目?
- clion之Clion License Activation破解
- java鬼混笔记:springboot 5、springboot的Scheduled定时器:fixedDelay和fixedRate区别
- matlab自带的插值函数interp1的四种插值方法
- jmeter性能测试脚本录制不了的几种情况
- SSL单向、双向认证
- HTTPS 中双向认证SSL 协议的具体过程
- C语言程序设计之通讯录