Turtle coding — Python(Beginners)

I am a software Engineer at OBS. I am a keen learner of technologies and always try new and different things. Tried things out of my domain and searched for what was best suited for me. At last, I found learning coding, new technologies, and tools to be my favorite.

Let’s start with building some basic diagrams.

  1. Triangle — Here, is the code:-

from turtle import *

color(“red”)

pensize(3)

left(120)

forward(200)

left(120)

forward(200)

left(120)

forward(200)

Triangle-color(red)

You can change according to your need with size and length. It’s simple and easy if you just hit and try to learn.

Here is the official documentation if you want for the turtle commands. Hope you will find it beneficial —

2.) Rectangle — I will paste the screenshot of the code and hope you will understand after doing it with the triangle.

It’s my first day. So this will be till now. I will be posting on a regular basis after learning new and cool stuff. Hope you like it. I will try to improve more on content. Happy days ahead, see you in some time.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store