Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
No results
  • About AskPython
  • Blog
  • Contact Me
  • Free Online Developer Tools Hub
  • Home
  • Meet the Team
  • Privacy Policy
  • Python
  • Python Course for Beginners Online FREE
  • Python Tutorial – Mega Index
  • Terms and Conditions

🚀 Supercharge your YouTube channel's growth with AI.

Try YTGrowAI Free
  • Home
  • Blog
  • About AskPython
  • Python Course
  • Start Here

Python Turtle – Drawing a Fish in Python

  • Isha BansalIsha Bansal
  • March 23, 2022
  • Python Programming Examples
Python Turtle – Drawing a Fish in Python

Hey coder! In this tutorial, I will show you how to draw a fish with the help of the python turtle module. If you are not aware of what turtle module is, check out the tutorial here.

You need to import the turtle library that comes with Python and there is no need to do any additional installing.

import turtle

The next step involves creating a canvas to draw the fish. We can name the canvas variable according to our needs. For now, we have the name of the screen as fish_scr. The code below does the creation and displaying of the screen for the user. We have also added some extra properties including the color of the screen and pen.

import turtle
fish_scr = turtle
fish_scr.color('black')
fish_scr.Screen().bgcolor("#85C1E9")

Now let’s create a function that will draw the fish for us. The name of the function is Draw_Fish that will draw the fish for us on the screen. The goto function takes the pointer to a certain position. The penup and pendown function controls when to draw and when to not draw. Also, the forward and backward function needs the distance as a parameter, on the other hand, the left and right function needs an angle of turning as a parameter.

def Draw_Fish(i,j):
    fish_scr.penup()
    fish_scr.goto(i,j)
    fish_scr.speed(10)
    fish_scr.left(45)
    fish_scr.pendown()
    fish_scr.forward(100)
    fish_scr.right(135)
    fish_scr.forward(130)
    fish_scr.right(130)
    fish_scr.forward(90)
    fish_scr.left(90)
    fish_scr.right(90)
    fish_scr.circle(200,90)
    fish_scr.left(90)
    fish_scr.circle(200,90)
    fish_scr.penup()
    fish_scr.left(130)
    fish_scr.forward(200)
    fish_scr.pendown()
    fish_scr.circle(10,360)
    fish_scr.right(270)
    fish_scr.penup()
    fish_scr.forward(50)
    fish_scr.pendown()
    fish_scr.left(90)
    fish_scr.circle(100,45)
    fish_scr.penup()
    fish_scr.forward(300)
    fish_scr.left(135)
    fish_scr.pendown()
    fish_scr.right(180)

Let’s draw three fishes on the screen using the code below. And after we are done drawing the fish we will close the application screen using the done function.

Draw_Fish(0,0)
Draw_Fish(150,150)
Draw_Fish(150,-150)
fish_scr.done()

The Complete Code

import turtle
fish_scr = turtle
fish_scr.color('black')
fish_scr.Screen().bgcolor("#85C1E9")

def Draw_Fish(i,j):
    fish_scr.penup()
    fish_scr.goto(i,j)
    fish_scr.speed(10)
    fish_scr.left(45)
    fish_scr.pendown()
    fish_scr.forward(100)
    fish_scr.right(135)
    fish_scr.forward(130)
    fish_scr.right(130)
    fish_scr.forward(90)
    fish_scr.left(90)
    fish_scr.right(90)
    fish_scr.circle(200,90)
    fish_scr.left(90)
    fish_scr.circle(200,90)
    fish_scr.penup()
    fish_scr.left(130)
    fish_scr.forward(200)
    fish_scr.pendown()
    fish_scr.circle(10,360)
    fish_scr.right(270)
    fish_scr.penup()
    fish_scr.forward(50)
    fish_scr.pendown()
    fish_scr.left(90)
    fish_scr.circle(100,45)
    fish_scr.penup()
    fish_scr.forward(300)
    fish_scr.left(135)
    fish_scr.pendown()
    fish_scr.right(180)

Draw_Fish(0,0)
Draw_Fish(150,150)
Draw_Fish(150,-150)

fish_scr.done()

When we execute the code above, a new screen comes on the system screen and the fishes begin to draw on the screen in the application. The same is shown below.

Congratulations! Now you know how to draw a fish on the screen using the Turtle module in Python. Thank you for reading! If you liked this tutorial, I would recommend you to go through the following tutorials as well:

  • Python Pygame: An Easy Introduction
  • Ways to Generate Random Colors in Python
  • Easy Games in Python

Keep reading to learn more! Happy coding! 😄

Isha Bansal
Isha Bansal

Hey there stranger!
Do check out my blogs if you are a keen learner!

Hope you like them!

Articles: 185
How Casinos Can Benefit from Big Data Approaches
Previous Post How Casinos Can Benefit from Big Data Approaches
Next Post Drawing Car using Turtle in Python
Drawing Car using Turtle in Python

Related Posts

How to Calculate Distance Between Two Points in Python

How to Calculate Distance Between Two Points in Python

  • November 26, 2026
CIFAR 10 Dataset: Load and Use in Python

CIFAR 10 Dataset: Load and Use in Python

  • November 24, 2026
Maximum A Posteriori Estimation in Python

Maximum A Posteriori Estimation in Python

  • November 24, 2026

Partner Websites

  • GoLangDocs
  • LinuxForDevices
  • CodeForGeek

Popular Categories

  • Python Programming
  • Python Modules
  • OOPS in Python
  • Python Programming Examples
  • Strings in Python

Hall of Fame

  • Python Programming
  • OOPS in Python
  • Creating Python Modules
  • Args and Kwargs in Python
  • Python Dictionary (Dict) Tutorial
  • Python List – 15 Things You MUST Know
  • Python Set – Things You MUST Know
  • Python String Functions: Methods by Task

Important Links

  • Home
  • Python Course
  • Start Here
  • Blog
  • About AskPython
Latest posts
  • np.linalg.eig: Eigenvalues and Eigenvectors
  • What Does %s Mean in a Python Format String?
  • How to Use np.sin() in NumPy
  • cv2.imread: Load Images with OpenCV
  • pd.read_json: Read JSON Into a DataFrame

Copyright © 2026 - AskPython. All rights reserved.