Turtle in Python

All

2Intro

I was playing a bit on python, as usual, and I came again with the Turtle built-in module. That’s an amazing module that remembers me the good days of Logo, Rip Seymont Paper.

Turtle

Such a cool module, it’s totally underrated. Well, at least on my side. Make sure to not name the module turtle, As I did, it won’t work obviously.

import turtle

silly = turtle.Turtle()

silly.forward(50)
silly.right(90)     # Rotate clockwise by 90 degrees

silly.forward(50)
silly.right(90)

silly.forward(50)
silly.right(90)

silly.forward(50)
silly.right(90)

turtle.done()

The references can be found here [1] and some codes I’ve done can be found here [2]. It’s very simple, pretty much like logo.

Simple things like square and circles are done with just one line.

REFs

[1] https://docs.python.org/2/library/turtle.html

[2]https://github.com/FranciscoMeloJr/Python-Tests

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s