Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import turtle as tur

import colorsys as cs

tur.setup(600, 600)
tur.speed(0)
tur.tracer(100)
tur.width(2)
tur.bgcolor('black')

# Jumlah putaran animasi


num_turns = 50

for j in range(num_turns):
for i in range(15):
tur.color(cs.hsv_to_rgb(i / 15, 1, 1))
tur.right(90)
tur.circle(200 - j * 4, 90)
tur.left(90)
tur.circle(200 - j * 4, 90)
tur.right(180)
tur.circle(2, 54)

# Menutup jendela setelah animasi selesai


tur.hideturtle()
tur.done()

###########################

import turtle as tur


import colorsys as cs

tur.setup(600, 600)
tur.speed(0)
tur.tracer(100)
tur.width(2)
tur.bgcolor('white')

# Jumlah putaran animasi


num_turns = 50

for j in range(num_turns):
for i in range(15):
tur.color(cs.hsv_to_rgb(i / 15, 1, 1))
tur.right(90)
tur.circle(200 - j * 4, 150)
tur.left(90)
tur.circle(200 - j * 4, 100)
tur.right(180)
tur.circle(2, 54)

# Menutup jendela setelah animasi selesai


tur.hideturtle()
tur.done()

You might also like