Circular Spirograph with python turtle

Introduction

Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967.

Turtle is a special feathers of Python. Using Turtle, we can easily draw in a drawing board.First we import the turtle module. Then create a window, next we create turtle object and using turtle method we can draw in the drawing board.

Follow us on

Code

import turtle
# Creating turtle
t = turtle.Turtle()

turtle.bgcolor(“black”)
turtle.pensize(2)
turtle.speed(0)

while (True):
for i in range(6):
for colors in [“red”, “blue”, “magenta”, “green”, “yellow”, “white”]:
turtle.color(colors)
turtle.circle(200)
turtle.left(10)

turtle.hide()
turtle.mainloop()

Output

Follow us on

Download as file đź”»

Vibrate circle with python turtle

VIBRATE CIRCLE

Introduction

Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967.

Turtle is a special feathers of Python. Using Turtle, we can easily draw in a drawing board.First we import the turtle module. Then create a window, next we create turtle object and using turtle method we can draw in the drawing board.

Follow us on

Code

import turtle
# Creating turtle
t = turtle.Turtle()
s = turtle.Screen()
s.bgcolor(“black”)
t.pencolor(“red”)

a = 0
b = 0
t.speed(0)
t.penup()
t.goto(0,200)
t.pendown()
while(True):
t.forward(a)
t.right(b)
a+=3
b+=1
if b == 210:
break
t.hideturtle()

turtle.done()

Output

Follow us on

Download as file đź”»

Technology and programming

Design a site like this with WordPress.com
Get started