amazing patterns in python turtle programing coding | Methods and Examples of Python Turtle Source Code

Share

Draw Beautiful patterns using Python and Turtle | coolest Python turtle graphic

python turtle cool designs pattern Source Code



from turtle import *
from random import *
from time import sleep
screen = Screen()
screen.setup(width = 1.0, height = 1.0)
colormode(255)
def color1():
    r=randint(0,255)
    g=randint(0,255)
    b=randint(0,255)
    return r,g,b

def start():
    sleep(1.2)
    clear()
    penup()
    goto(0,0)
    pendown()

pensize(3)
speed(0)
bgcolor(255, 255, 153)


title('pattern 1')
for i in range(350):
    circle(i,45)
    right(98)
    color(color1())

    
start()
title('pattern 2')

for i in range(200):
    circle(i,180)
    right(98)
    color(color1())
start()
title('pattern 3')

for i in range(200):
    circle(i,45)
    right(90)
    color(color1())
    
start()
title('pattern 4')

for i in range(120):
    circle(i,45)
    right(90)
    circle(i,90)
    color(color1())
start()

title('pattern 5')
for i in range(300):
    right(98)
    circle(i,45)
    fd(10)
    color(color1())   

python turtle pattern code

python turtle graphics code examples


Share
Related  how to make star in python turtle| five pointed start in python turtle source code

Leave a Reply

Your email address will not be published. Required fields are marked *