Open In App
Related Articles

turtle.forward() method in Python-Turtle

Improve Article
Save Article
Like Article

The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.


The turtle.forward() method is used to move the turtle forward by the value of the argument that it takes. It gives a line on moving to another position or direction. 


The argument it takes is distance { a number (integer or float) }. So, it moves the turtle forward by the specified distance, in the direction the turtle is headed.

Below is the implementation of above method with some examples :

Example 1:


# importing packages
import turtle
# move turtle forward with 
# distance = 100

Output :

Example 2:


# importing package
import turtle
# move the turtle forward by 50
# change the direction
# move the turtle forward by 50 again

Output :

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 16 Jul, 2020
Like Article
Save Article
Similar Reads
Related Tutorials