Using python’s tkinter module we can create a logo style programs. To do this in python import the module tkinter. Draw the class turtle. Initialize the turtle class with coordinates and angle. Write a function draw_turtle. Draw three straight lines to form a triangle. Write another function delete_turtle to delete the lines. To move forward write mv_fwd function with a parameter ‘distance’. In this function first delete the turtle, draw a line to that distance and redraw the turtle. Preserve the angle.
Visit my github location for source code – http://github.com/abhilashak/logo_in_python
To rotate write rt_lt and rt_rt functions. First delete the existing turtle. From the angle this function calculates the position of new turtle. Redraw it. rt_rt is just the negative angle of rt_lt.