Python Turtle Full Tutorial | Star Code In Python Turtle | Code With Python Turtle

0

 


Source Code :

import turtle

sc = turtle.Screen()
sc.bgcolor('black')

def star():
   
    size = 100
    turtle.color('red')
    turtle.width(7)
    angle = 120
   
    turtle.fillcolor('yellow')
    turtle.begin_fill()
   
    for side in range(5):
        turtle.forward(size)
        turtle.right(angle)
        turtle.forward(size)
        turtle.right(72 - angle)
       
    turtle.end_fill()
   
star()
turtle.exitonclick()
#execute.......
Tags

Post a Comment

0Comments

If you have any doubts, Please let me know

Post a Comment (0)