My Channel

Python Turtle Pattern

 Python Turtle Pattern

Hey Guys,

In this Post, we will be seeing on the Python Pattern that I created using Turtle module.

What is Turtle and what can we do...


So, let me share you the Code:

import turtle as t
import random
window = t.Screen()
window.bgcolor("black")
pen = t.Turtle()


i = 10
while i < 300:
pen.color("Violet")
pen.right(60)
pen.forward(i)
pen.right(60)
pen.forward(i)
pen.right(60)
pen.forward(i)
i += 10



This code will create you a beautiful pattern.

The Video - This Code will Blow your Mind🤯.

STEPS:

1.First we import turtle as 't' and then we do all the necessary programs.

2.We include a while loop for it to create this pattern until the length of pen becomes 300.

3.I have set the Angle to 60॰ to turn right at the certain Angle.


Use the above code to make necessary actions as you wish.

I hope you understood this program and be sure to wait for more interesting contents.

Please Subscribe, Share and Comment

By the Blog Author.


Post a Comment

0 Comments