Python drawing austrain flag using turtle 

  In this blog we will draw austrain project using turtle . We draw the simple flag using python library name as turtle.Turtle provide easy way to draw any board using turtle.

Getting to Realize the Python turtle Library

turtle is a pre-introduced Python library that empowers clients to make pictures and shapes by giving them a virtual material. The onscreen pen that you use for drawing is known as the turtle and this is the very thing gives the library its name. So, the Python turtle library assists new developers with discovering what programming with Python resembles in a tomfoolery and intuitive way.


turtle is fundamentally used to acquaint youngsters with the universe of PCs. It's a clear yet flexible method for figuring out the ideas of Python. This makes it an extraordinary road for youngsters to make their most memorable strides in Python programming. That being said, the Python turtle library isn't confined to little ones alone! It's likewise demonstrated incredibly helpful for grown-ups who are taking a stab at Python, which makes it extraordinary for Python fledglings.


With the Python turtle library, you can draw and make different sorts of shapes and pictures. Here is an example of the sorts of drawings you can make with turtle:

  Python Turtle projects 

   First we will import the turtle library in our python code.

   import turtle

   Now get the turtle module and then you can do any thing using turtle object.

   

   Using turtle object you can call any method to draw dimenssion or any other lines or color.

    

   We can use lot of  function of turtle using turtle object like forword() ,backword() , Up(), down().

 

     Code Part 1:

Python Turtle projects
 Python Turtle projects

Code Part 2:


Python Turtle projects
 Python Turtle projects


Here is Out Put for this Code above .

Python Turtle projects
 Python Turtle projects

Here is code of above example



import turtle


def rectangle(height, width, color):
turtle.fillcolor(color)
turtle.begin_fill()
for _ in range(2):
turtle.forward(width)
turtle.left(90)
turtle.forward(height)
turtle.left(90)
turtle.end_fill()


rectangle(50, 250, "red") # bottom red

turtle.left(90) #
turtle.forward(50) # go 50 pixel up
turtle.right(90) #

rectangle(50, 250, "white") # middle white

turtle.left(90) #
turtle.forward(50) # go 50 pixel up
turtle.right(90) #

rectangle(50, 250, "red") # top red

turtle.done()

Austrain Flag Code


                      I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the python project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back