{"id":10135,"date":"2022-05-04T14:56:40","date_gmt":"2022-05-04T09:26:40","guid":{"rendered":"https:\/\/copyassignment.com\/?p=10135"},"modified":"2022-12-06T10:40:23","modified_gmt":"2022-12-06T05:10:23","slug":"draw-penguin-using-python-turtle","status":"publish","type":"post","link":"https:\/\/copyassignment.com\/draw-penguin-using-python-turtle\/","title":{"rendered":"Draw Penguin using Python Turtle"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Hello my dear Friends, hope all of you are fine. Today we have come up with a simple and easy program of python turtle i.e. to Draw Penguin using Python Turtle. That is the penguin which is drawn by anyone who understands the basics of the python Turtle.<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-9886351916045880\" data-ad-slot=\"2002566052\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p>Here we have provided very simple lines of code. Each line of code is easily understandable to draw a particular object<\/p>\n\n\n\n<p>You can check our website for more articles related to python turtle and its projects.<\/p>\n\n\n\n<p>If you want only code, please go to the bottom of the page and copy the code from there using the copy button. So let&#8217;s get started.<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">1. Import turtle<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">Import turtle<\/pre>\n\n\n\n<p>The import function in this allows us to import the turtle package. It contains some inbuilt methods and functionalities which help in the proper functioning of a turtle. It helps us to draw anything using a python turtle.<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">2. Creating Turtle Object<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen=turtle.Turtle()\npen.setheading(270)\n<\/pre>\n\n\n\n<p>In this part, we have created the turtle object i.e pen.&nbsp; With the help of this object turtle, we can access all the inbuilt functions of the turtle. In this part, we have also set the orientation of the turtle to the angle of 270<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"247\" height=\"239\" data-src=\"https:\/\/copyassignment.com\/wp-content\/uploads\/2022\/05\/image-16.png\" alt=\"angle distribution in python turtle\" class=\"wp-image-10137 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 247px; --smush-placeholder-aspect-ratio: 247\/239;\" \/><figcaption class=\"wp-element-caption\">This is a small diagram of angle which helps us to understand how we can set the angle of the object we are drawing.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">3. Creating the body of the penguin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.begin_fill()\npen.circle(50,180)\npen.forward(80)\npen.circle(50,180)\npen.forward(80)\npen.end_fill()\n<\/pre>\n\n\n\n<p>In this part, we have started to begin_fill function which fills the body color with black. pen. The circle (50,180) function allows us to draw 2 &nbsp;half semicircles of radius 50 with an angle of 180 degrees. The forward(80) function allows the turtle to move 80 steps forward.<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">4. Creating the Belly of Penguin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.fillcolor(\"white\")\npen.goto(10,0)\npen.begin_fill()\npen.circle(40)\npen.end_fill()\n<\/pre>\n\n\n\n<p>The belly of the penguin is filled with white color as we set the fill color to white. The goto(10,0) function allows the turtle to move 10 steps forward from the x-axis. draw a circle of radius 40 filled with white.<\/p>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-9886351916045880\" data-ad-slot=\"2002566052\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">5 Creating white eyes of a penguin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.setheading(0)\npen.goto(30,80)\npen.begin_fill()\npen.circle(20)\npen.end_fill()\npen.goto(70,80)\npen.begin_fill()\npen.circle(20)\npen.end_fill()\n<\/pre>\n\n\n\n<p>In this part of the code, we have created 2 eyes of a penguin. Again we have set the angle of the turtle to 0. the turtle is set at specified coordinates.<\/p>\n\n\n\n<p>Drawn the left circle with a radius of 20. similar to the right eye .goto(70,80) turtle moved 70 steps to the x-axis and 80 to the y-axis to draw the right circle.<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">5. Creating the inner black dot of the eye<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.shape(\"circle\")\npen.fillcolor(\"black\")\npen.penup()\npen.goto(30,100)\npen.stamp()\npen.goto(70,100)\npen.stamp()\n<\/pre>\n\n\n\n<p>This block of code makes the turtle draw the shape of a circle. Put the shape in the stamp format at the specified coordinates.<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">6 Making the nose of a penguin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.shape(\"triangle\")\npen.fillcolor(\"orange\")\npen.goto(50,70)\npen.setheading(270)\npen.stamp()\n<\/pre>\n\n\n\n<p>Here we have made the nose shape to triangle filled with orange color. We have set the heading position to 270 degrees to draw the nose at coordinates (50,70).<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">7. Drawing hands of penguin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.fillcolor(\"black\")\npen.pencolor(\"white\")\npen.setheading(0)\npen.goto(0,50)\npen.stamp()\npen.setheading(180)\npen.goto(100,50)\npen.stamp()<\/pre>\n\n\n\n<p>In this code we have created the hands of the penguin making the fill color black and the pen color white, we have set the heading position to 0 and 180 degrees so the triangle points accordingly.<\/p>\n\n\n\n<h3 class=\"has-medium-font-size wp-block-heading\">8. Drawing the legs of the penguin<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ededed\">pen.shape(\"square\")\npen.fillcolor(\"orange\")\npen.goto(35,-50)\npen.stamp()\npen.goto(65,-50)\npen.stamp()\nturtle.done()\n<\/pre>\n\n\n\n<p>This part of the code draws the penguin legs filled with orange color.  Setting the coordinates accordingly i.e goto(35,-50) and goto(65,-50) . This results in the x coordinate changed and y will remain the same.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Complete Code to Draw Penguin using Python Turtle<\/h2>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-9886351916045880\" data-ad-slot=\"2002566052\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><div style=\"position:absolute;top:-20px;right:0px;cursor:pointer\" class=\"copy-simple-code-block\"><span class=\"dashicon dashicons dashicons-admin-page\"><\/span><\/div><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"python\" data-theme=\"xcode\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"true\">#Import turtle\nimport turtle\n\n#Setting the turtle object\npen=turtle.Turtle()\npen.speed(1)\n#Setting the headposition  of turtle at angle 270 degree\npen.setheading(270)\npen.begin_fill()\n#draws the penguin body\npen.circle(50,180)\npen.forward(80)\npen.circle(50,180)\npen.forward(80)\npen.end_fill()\n\n#Belly of penguin\npen.fillcolor(\"white\")\npen.goto(10,0)\npen.begin_fill()\npen.circle(40)\npen.end_fill()\n\n#Eyes of penguin\npen.setheading(0)\npen.goto(30,80)\npen.begin_fill()\npen.circle(20)\npen.end_fill()\npen.goto(70,80)\npen.begin_fill()\npen.circle(20)\npen.end_fill()\n\n# Eye  dot of penguins eye\npen.shape(\"circle\")\npen.fillcolor(\"black\")\npen.penup()\npen.goto(30,100)\npen.stamp()\npen.goto(70,100)\npen.stamp()\n\n\n#Nose of penguin\n\npen.shape(\"triangle\")\npen.fillcolor(\"orange\")\n\npen.goto(50,70)\npen.setheading(270)\npen.stamp()\n\n#Hands of penguin\npen.fillcolor(\"black\")\npen.pencolor(\"white\")\npen.setheading(180)\npen.goto(0,50)\npen.stamp()\npen.setheading(0)\npen.goto(100,50)\npen.stamp()\n\n\n#legs of penguin\npen.shape(\"square\")\npen.fillcolor(\"orange\")\npen.goto(35,-50)\npen.stamp()\npen.goto(65,-50)\npen.stamp()\nturtle.done()\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Output<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" data-src=\"https:\/\/copyassignment.com\/wp-content\/uploads\/2022\/05\/image-17.png\" alt=\"Draw Penguin using Python Turtle output\" class=\"wp-image-10138 lazyload\" width=\"382\" height=\"345\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 382px; --smush-placeholder-aspect-ratio: 382\/345;\" \/><\/figure>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-9886351916045880\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"autorelaxed\"\n     data-ad-client=\"ca-pub-9886351916045880\"\n     data-ad-slot=\"7933252109\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p>Thank you for reading this article.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p>Also Read:<\/p>\n\n\n<ul class=\"wp-block-latest-posts__list is-grid columns-3 wp-block-latest-posts\"><li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/create-your-own-chatgpt-with-python\/\">Create your own ChatGPT with\u00a0Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/sqlite-crud-operations-in-python\/\">SQLite | CRUD Operations in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/event-management-system-project-in-python\/\">Event Management System Project in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/ticket-booking-and-management-in-python\/\">Ticket Booking and Management in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/radha-krishna-using-python-turtle\/\">Radha Krishna using Python Turtle<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/hostel-management-system-project-in-python\/\">Hostel Management System Project in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/sales-management-system-project-in-python\/\">Sales Management System Project in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/bank-management-system-project-in-cpp\/\">Bank Management System Project in C++<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/python-download-file-from-url-4-methods\/\">Python Download File from URL | 4 Methods<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/python-programming-examples-fundamental-programs-in-python\/\">Python Programming Examples | Fundamental Programs in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/drawing-letter-a-using-python-turtle\/\">Drawing letter A using Python Turtle<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/spell-checker-in-python\/\">Spell Checker in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/portfolio-management-system-in-python\/\">Portfolio Management System in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/stickman-game-in-python\/\">Stickman Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/contact-book-project-in-python\/\">Contact Book project in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/loan-management-system-project-in-python\/\">Loan Management System Project in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/cab-booking-system-in-python\/\">Cab Booking System in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/brick-breaker-game-in-python\/\">Brick Breaker Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/wishing-happy-new-year-2023-in-python-turtle\/\">Wishing Happy New Year 2023 in Python Turtle<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/tank-game-in-python\/\">Tank game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/gui-piano-in-python\/\">GUI Piano in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/ludo-game-in-python\/\">Ludo Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/rock-paper-scissors-game-in-python\/\">Rock Paper Scissors Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/snake-and-ladder-game-in-python\/\">Snake and Ladder Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/puzzle-game-in-python\/\">Puzzle Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/draw-goku-in-python-turtle\/\">Draw Goku in Python Turtle<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/medical-store-management-system-project-in-python\/\">Medical Store Management System Project in\u00a0Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/draw-mickey-mouse-in-python-turtle\/\">Draw Mickey Mouse in Python Turtle<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/creating-dino-game-in-python\/\">Creating Dino Game in Python<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/tic-tac-toe-game-in-python\/\">Tic Tac Toe Game in Python<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Introduction Hello my dear Friends, hope all of you are fine. Today we have come up with a simple and easy program of python turtle&#8230;<\/p>\n","protected":false},"author":62,"featured_media":10169,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,1067],"tags":[1424,1425,1093],"class_list":["post-10135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allcategorites","category-python-turtle","tag-draw-penguin-using-python-turtle","tag-penguin","tag-turtle-design","wpcat-22-id","wpcat-1067-id"],"_links":{"self":[{"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/posts\/10135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/comments?post=10135"}],"version-history":[{"count":0,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/posts\/10135\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/media\/10169"}],"wp:attachment":[{"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/media?parent=10135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/categories?post=10135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/tags?post=10135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}