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

Share

making a five pointed star in python is easy

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
speed(0)
def start():
    penup()
    goto(randint(0,400),randint(0,400))
    pendown()

pensize(3)
bgcolor('black')


title('pattern 1')
def star():
    for i in range(5):
        fd(150)
        right(180-36)


for i in range(5):
    start()
    pencolor(color1())
    star()

keyword

how to draw a 5 point star in python

making a five pointed star in python is easy


Share
Related  How To extract all possible sub arrays of a 2D array

Leave a Reply

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

Top 5 Most Expensive Domains Ever Sold 4 Must-Try ChatGPT Alternatives: Perplexity AI, BardAI, Pi, and More! Types of Trading Techniques in the Stock Market. ChatGPT app now available in India this AI chatbot can help you make your life more productive. What is wrong with following function code?