Skip to main content

Posts

Showing posts with the label python tutorials

Python Turtle Tutorials : Program to create a Ninja Circle

 Python Turtle tutorials Program to create amazing  Ninja Circle logo design in Python.  Code :  """ Program to create a Bi-pyramid structure Source : CODE PROBLEM (Youtube) """ import turtle turtle.Screen().bgcolor( "black" ) # set the background color to black turtle.speed( 0 ) # the fastest speed turtle.pensize( 2 ) # set the width of the drawing pen rainbow = [ 'red' , 'orange' , 'yellow' , 'green' , 'blue' , 'indigo' ] for i in range ( 110 ): turtle.color(rainbow[i% 6 ]) turtle.fd( 100 ) turtle.right( 28 ) turtle.fd( 30 ) turtle.left( 90 ) turtle.fd( 70 ) turtle.right( 30 ) turtle.fd( 50 ) turtle.penup() turtle.setposition( 0 , 0 ) turtle.pendown() turtle.right( 1 ) #hide the turtle after the shape has been drawn turtle.hideturtle() turtle.done() Output :      Learn through video : https://youtu.be/DhWbPnVfonY

Python Turtle tutorials : Create a Bi-Pyramid structure

 Python Turtle Tutorials  Create a Bi-Pyramid structure using Python  Code :           """ Program to create a Bi-pyramid structure Source : CODE PROBLEM (Youtube) """ import turtle scr = turtle.Screen() # create screen object scr.bgcolor( 'black' ) turtle.speed( 0 ) # the fastest speed turtle.pensize( 2 ) # set the width of the drawing pen turtle.color( 'skyblue' ) # set pencolor to 'skyblue' for i in range ( 30 ): turtle.fd(i* 10 ) turtle.right( 120 ) for j in range ( 29 , 0 ,- 1 ): turtle.fd(j* 10 ) # move forward turtle.left( 120 ) turtle.hideturtle() # hiding the turtle after the completion of the drawing turtle.done() # for holding the screen Output : Learn from video : Watch on youtube