Skip to content
← Back to Community
How to Make Cool Art with Python Turtle
Profile icon
Barry123

Hi everyone and here's just a quick tutorial on how to create cool designs with Python Turtle in just a few lines of code!


**Step 1: **

#This is a comment import turtle #import the turtle module bob = turtle.Turtle() #create a turtle named bob

Import the turtle module and create a turtle (in this case the turtle is called bob, but you can name the turtle whatever you want).


Step 2:

for i in range(360): #run the code 360 times bob.forward(47) #forward 47 pixels bob.left(103) #turn left 103 degrees bob.circle(80,90) #draw a circle with a radius of 80 for 90 degrees bob.circle(60,120)

Add a for loop with some random turtle code like the ones listed above. You can find a list of turtle commands here.


Step 3:

Add some colors to your drawing. The code to set the color of bob to green is bob.color("green"). You may also use RGB: bob.color((0,255,0)). You can change the turtle's color as many times as you like. Change the background color this way:

s=turtle.Screen() s.bgcolor("black")

Step 4:

Test out your code. If it doesn't look right try again with different values. Repeat the process until you have a perfect turtle drawing. Tip: make bob invisible with bob.hideturtle() if that looks better. He will still be able to draw.


Step 5:

Make the turtle draw faster. Setting the speed to the highest with bob.speed(0) will work, but sometimes it will still take a long time to draw. Putting the drawing code between bob.tracer(0) and bob.tracer(1) makes the whole thing really fast.

import turtle bob=turtle.Turtle() s=turtle.Screen() s.bgcolor("black") bob.hideturtle() for i in range(180): bob.tracer(0) bob.color("Yellow") bob.forward(47) bob.left(103) bob.color("Cyan") bob.circle(80,90) bob.color("deeppink") bob.circle(60,120) bob.tracer(1)

Great! Now you have a nice turtle drawing to stare at all day!

Voters
Profile icon
JohannesMyroldh
Profile icon
Naser-Saddeeq-A
Profile icon
MichaelBramhal1
Profile icon
NataliaKurdziel
Profile icon
IsaiahCazares
Profile icon
EliBartleyClyme
Profile icon
JoshuaLlewelly1
Profile icon
ColinOKeefe1
Profile icon
EnsoValle
Profile icon
AndrsOlalla
Comments
hotnewtop
Profile icon
AfnanZia

To fight rages use rash guard men

Profile icon
AfnanZia
Profile icon
JohnMartin13

If you are looking for employees you can get help from free job posting sites.

Profile icon
NolanNR9016

did not work

Profile icon
rachit22

it says line 7 has problem i cant make it

image

Profile icon
21SharmaI

big brain

Profile icon
AricJoshua

These lines of code have greatly aided me in completing the python turtle painting. I'm a software student, and I really need to understand the code. cookie clicker

Profile icon
pipahaha

Your instructions are very detailed, I will follow along to see how the results! word counter online

Profile icon
Barry123

lol

Profile icon
GregoryStellar

First, you need to understand Turtle, which is a drawing board-like Python function that lets us tell the turtle to draw all over it! We can use functions like turtle.forward (…) and turtle.right (…) that can move the turtle. Commonly used methods for turtles are: Method Parameter Description
It is like a basic foundation in various sciences of plastic surgery here and cosmetic surgery, which takes the first step and then step by step!

Profile icon
Barry123

lol

Profile icon
JohnMartin13

These lines of codes help me a lot to complete the art of python turtle. I am a student of software and I really need to learn the code. The essaypro help me a lot in Learning code. They write easy and understand code for students, so they can understand it well.

Profile icon
Barry123

lol

Profile icon
MemeManHimself

amAzINg wOah

Profile icon
Barry123

Thanks!

Profile icon
MemeManHimself

@Barry123 np :D

Profile icon
k9chelsea2

noice