Python 's magic

Published: 19 May 2022
on channel: SyntaxD
309
like

Construct graphics with python.

Code :-
import random
import turtle
colors = ['red','cyan','pink' ,'yellow', 'green','orange']
t = turtle.Turtle()
t.speed(10)
turtle.bgcolor("black")
length=100
angle =50
size=5
for i in range(length):
color=random.choice(colors)
t.pencolor(color)
t.fillcolor(color)
t.penup()
t.forward(i+50)
t.pendown()
t.left(angle)
t.begin_fill()
t.circle(size)
t.end_fill()
turtle.exitonclick()
turtle.bgcolor("black")

#shorts #python #computer #coding


On this page of the site you can watch the video online Python 's magic with a duration of hours minute second in good quality, which was uploaded by the user SyntaxD 19 May 2022, share the link with friends and acquaintances, this video has already been watched 309 times on youtube and it was liked by like viewers. Enjoy your viewing!