码迷,mamicode.com
首页 > 其他好文 > 详细

奥运五环

时间:2020-11-26 14:11:54      阅读:5      评论:0      收藏:0      [点我收藏+]

标签:col   rtl   bsp   rgb   rgba   black   turtle   pre   div   

#1
from
turtle import* pensize(8) color("black") up() goto(50,0) down() circle(100) color("blue") up() goto(-170,0) down() circle(100) color("red") up() goto(270,0) down() circle(100) color("green") up() goto(160,-120) down() circle(100) color("yellow") up() goto(-60,-120) down() circle(100) hideturtle() done()
#2
a=(50,-170,270,160,-60)
b=(0,0,0,-120,-120)
c=("black","blue","red","green","yellow")
from turtle import*
pensize(8)
for i in range(5):
    color(c[i])
    up()
    goto(a[i],b[i])
    down()
    circle(100)
hideturtle()
done()

 

奥运五环

标签:col   rtl   bsp   rgb   rgba   black   turtle   pre   div   

原文地址:https://www.cnblogs.com/aclinnn/p/14019098.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!