标签:hid http tuple inf 图形 难点 com mic mamicode
import turtle turtle.setup(800,600) turtle.pencolor(‘pink‘) for i in range(4): for i in range(2): turtle.circle(80,90) turtle.left(90) turtle.right(90) turtle.left(30) for i in range(4): for i in range(2): turtle.circle(80,90) turtle.left(90) turtle.right(90) turtle.left(30) for i in range(4): for i in range(2): turtle.circle(80,90) turtle.left(90) turtle.right(90) turtle.hideturtle() turtle.done()
import turtle turtle.speed(0) turtle.setup(800,600) turtle.bgcolor(‘black‘) turtle.pencolor(‘white‘) angle = 0 size = 2 for i in range(10): for j in range(4): turtle.forward(size) angle = angle + 72 turtle.seth(angle) size = size + 5 turtle.hideturtle() turtle.done()
import turtle import random turtle.setup(800,600) turtle.penup() turtle.backward(100) turtle.pendown() i = 0 while i < 20: rgb = tuple(random.random() for i in range(3)) turtle.color(rgb) turtle.begin_fill() turtle.forward(10) turtle.left(90) turtle.forward(30) turtle.left(90) turtle.forward(10) turtle.left(90) turtle.forward(30) turtle.left(90) turtle.forward(10) i = i + 1 turtle.end_fill() turtle.hideturtle() turtle.done()
import turtle def square(size=50,rgb=‘orange‘): turtle.pencolor(rgb) for i in range(4): turtle.forward(size) turtle.left(90) def main(): turtle.setup(800,600) turtle.speed(0) for i in range(10): square(80) turtle.left(36) turtle.hideturtle() turtle.done() if __name__ == ‘__main__‘: main()
实验总结:
数据分析初始阶段,通常要进行可视化处理。数据可视化旨在直观展示信息的分析结果和构思,令某些抽象数据具象化,这些抽象数据包括数据测量单位的性质或数量。数据可视化是数据分析中很重要的一部分,它能够帮助用户从繁杂的数据中更直观有效地获取信息。
turtle库可以绘制多种图形,对于数据可视化分析非常重要,其中语法知识较为简单,难点在于和之前的知识相结合,绘制出一些复杂的图形。
标签:hid http tuple inf 图形 难点 com mic mamicode
原文地址:https://www.cnblogs.com/-sfm/p/14875925.html