Make ' S ' using turtle in python.

                Welcome to ' S ' make turtle. 

                This is making ' S ' using turtle in python.







import turtle

# Create a turtle object
t = turtle.Turtle()

# Set fill color
t.fillcolor("red")

# Move the turtle to the starting point
t.penup()
t.goto(-100, 0)
t.pendown()

# Begin filling
t.begin_fill()

# Draw the S
t.forward(40)
t.circle(43, 180)
t.circle(-50, 180)
t.forward(40)


t.penup()
t.goto(-100, 0)
t.pendown()

t.right(90)
t.forward(15)
t.left(90)

t.forward(40)
t.circle(57, 180)
t.circle(-35, 180)
t.forward(40)

t.left(90)
t.forward(17.5)


# End filling
t.end_fill()

# Hide the turtle
t.hideturtle()

# Keep the window open until it is manually closed
turtle.done()

Comments

Popular posts from this blog

Name rolling game using python with GUI.

wallpaper changer.

color guessing game with GUI using python