We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abf4941 commit 45b2e24Copy full SHA for 45b2e24
Codes on Turtle Graphics/Kaleido-spiral.py
@@ -2,14 +2,14 @@
2
import time as ti
3
from itertools import cycle
4
5
-colors = cycle(['red','orange','yellow','blue','green','purple'])
+colors = cycle(['red','orange','yellow','blue','green','purple'])# create circles and squares of different colors
6
7
def draw_circle(size,angle,shift,shape):
8
t.pencolor(next(colors))
9
next_shape = ''
10
if shape == 'circle':
11
t.circle(size)
12
- next_shape = 'square'
+ next_shape = 'square'# draw next shape as square after circle
13
elif shape == 'square':
14
for i in range(4):
15
t.forward(size * 2)
@@ -20,7 +20,7 @@ def draw_circle(size,angle,shift,shape):
20
draw_circle(size + 5,angle+1,shift+1,next_shape)
21
22
t.bgcolor('black')
23
-t.speed('fast')
+t.speed('fast')# to create the figure fastly
24
t.pensize(4)
25
26
draw_circle(5,0,1,'circle')
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments