Create Infinity symbol using python

In this tutorial, we are here to show How to Create Infinity symbol using python. We have also added the video tutorial with the source code.

So let us begin with How to Create Infinity symbol using python.

 

Video Tutorial: Create Infinity symbol using python

 

 

Source Code: 

 

import turtle
screen = turtle.Screen()
screen.setup(550, 600, startx=0, starty=100)
t = turtle.Turtle()
turtle.bgcolor('black')
turtle.color('yellow')
turtle.speed(11)
turtle.right (45)
for i in range(150):
    turtle.circle(25)
    if 7 < i < 62:
        turtle. left(5)
    if 80 < i < 133:
        turtle.right(5)
    if i < 80:
        turtle.forward(10)
    else:
        turtle.forward(5)

 

Output:

 

Create Infinity symbol using python

Leave a Reply

Your email address will not be published.