投稿

2月 4, 2021の投稿を表示しています

turtle circle drawing

イメージ
from turtle import * screensize(canvwidth=200,canvheight=200) speed("fastest") hideturtle() for i in range(10): for j in range(10): if i % 2 ==0 and j%2 ==0: fillcolor("green") elif i % 2 == 0 and j%2 ==1: fillcolor("yellow") elif i % 2 == 1 and j%2 ==0: fillcolor("pink") elif i % 2 == 1 and j%2 ==1: fillcolor("blue") up() setx(i*20) sety(j*20) down() begin_fill() circle(10) end_fill()