Amazing Flower Design using Python turtle #python #coding #funny #viral #trending #shorts #coderhub

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Code -

from turtle import *
import colorsys

# Setup
speed(0)
bgcolor("black")
h = 0 # starting hue

# Drawing loop
for i in range(16): # repeat 16 times
for j in range(18): # draw 18 petals in each repetition
c = colorsys.hsv_to_rgb(h, 1, 1) # convert HSV to RGB
color(c) # set the color
h += 0.005 # change the hue a little for next petal

# Draw the petal shape
right(90)
circle(150 - j * 6, 90)
left(90)
circle(150 - j * 6, 90)
right(180)
circle(40, 24)

done()

Coderhub-k
Автор

ye same code me color change karna ho to konsi line edit karni padegi ?

AkleshwarUpadhyay
Автор

Do you explain the code in simple bro ?

akvi
visit shbcf.ru