利用Python 调用turtle函数库 绘制奥运五环。,,import tur
利用Python 调用turtle函数库 绘制奥运五环。,,import tur
import turtle #调用turtle库绘制图像的函数库
turtle.color("blue") #颜色 蓝色
turtle.circle(100) #画半径100的圆
turtle.penup() #抬起笔
turtle.goto(-180,0) #移动到
turtle.pendown() #放笔
turtle.color("red") #颜色 红色
turtle.circle(100) #画半径100的圆
turtle.penup() #提起笔
turtle.goto(180,0) #移动到
turtle.pendown() #放下笔
turtle.color("yellow") #画黄色的圆
turtle.circle(100) #画半径100的圆
turtle.penup()
turtle.goto(80,-180)
turtle.pendown()
turtle.color("green")
turtle.circle(100)
turtle.penup()
turtle.goto(-80,-180)
turtle.pendown()
turtle.color("black")
turtle.circle(100)
turtle.done #让程序继续运行
利用Python 调用turtle函数库 绘制奥运五环。
相关内容
- Python可视化 | Seaborn包—kdeplot和distplot,,import pan
- 快速排序(python实现),,def quick_
- python的动态性和_slot_,,python是动态语
- Python - 函数属性方法装饰器(二),,1.给类绑定属性值
- Python可视化Matplotlib-K线图,,引入类库import
- 对Python中一些“坑”的总结及技巧,,一.赋值即定义1
- python练习-8.12,,注:本代码是《pyt
- python读入txt数据,并转成矩阵,,txt文件的部分数据
- python计算不规则图形面积算法,,介绍:大三上做一个医
- python中列表的常用方法,,列表中的方法# 列表
评论关闭