{"id":10801,"date":"2022-05-22T22:34:21","date_gmt":"2022-05-22T17:04:21","guid":{"rendered":"https:\/\/copyassignment.com\/?p=10801"},"modified":"2022-08-24T13:50:10","modified_gmt":"2022-08-24T08:20:10","slug":"draw-javascript-logo-using-python-turtle","status":"publish","type":"post","link":"https:\/\/copyassignment.com\/draw-javascript-logo-using-python-turtle\/","title":{"rendered":"Draw Javascript Logo using Python Turtle"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Hello, and welcome friends to learn a new topic today. We are going to draw the Javascript Logo using a python turtle module. It&#8217;s super easy and exciting to learn as we have used simple lines of code. It is understandable to all the beginners interested in learning python. We provide all the explanations and comments for the lines of code as it helps in easy understanding of code.<\/p>\n\n\n\n<p>We have many project topics on python turtle and articles written on that, so keep visiting our website <a href=\"https:\/\/copyassignment.com\" target=\"_blank\" rel=\"noreferrer noopener\">www.violet-cat-415996.hostingersite.com<\/a><\/p>\n\n\n\n<p>For the complete code, move to the bottom of the page and you will get the entire code along with the output.<\/p>\n\n\n\n<p>So let&#8217;s begin drawing Javascript Logo<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">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:#ececec\">import turtle\nt=turtle.Turtle()\n<\/pre>\n\n\n\n<p>These lines of code import the module turtle. We have created the object t of the <a href=\"https:\/\/docs.python.org\/3\/library\/turtle.html\">turtle <\/a>module to access its methods and functions.<\/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=\"wp-block-heading\">Draw the outer box of Javascript Logo using Python Turtle<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ececec\">t.goto(-20,-70)\n#set the color\nt.color(\"#F0DB4F\",\"#F0DB4F\")\nt.begin_fill()\nt.pendown()\nt.left(165)\nt.forward(100)\nt.right(70)\nt.forward(220)\nt.setheading(0)\nt.forward(229)\n\nt.penup()\n\nt.goto(-20,-70)\nt.setheading(0)\nt.pendown()\nt.left(15)\nt.forward(100)\nt.left(70)\nt.forward(229)\nt.end_fill()\nt.penup()\n<\/pre>\n\n\n\n<p>In this block of code, we have initialized the position of the turtle to goto(-20,-70). The color is initialized to #F0DB4F. Here we have initialized the position to goto(-20,-70) twice. Drawn the outer line of the logo from both sides with the specified coordinates and the distance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Draw the \u2018J\u2019 of the javascript logo<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ececec\">#set the position to draw 'J'\nt.goto(-35,-20)\nt.setheading(90)\nt.color(\"white\",\"white\")\nt.pendown()\nt.begin_fill()\nt.forward(150)\nt.left(90)\nt.forward(20)\nt.left(90)\nt.forward(130)\nt.setheading(90)\nt.left(75)\nt.forward(40)\nt.left(110)\nt.forward(20)\nt.penup()\nt.goto(-35,-20)\nt.setheading(90)\nt.left(75)\nt.pendown()\nt.forward(60)\nt.end_fill()\nt.penup()\n<\/pre>\n\n\n\n<p>In this piece of code, we have to initialise the position of the turtle to goto(-35,-20). The heading position is 90. The color is initialized to white, the forward and left functions are used to draw the \u2018J\u2019 letter of the Javascript Logo.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Draw the yellow box for \u2018S\u2019 Letter<\/h3>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ececec\">t.color(&#8220;yellow&#8221;,&#8221;yellow&#8221;)<br><em>#Set the position<br><\/em>t.goto(-20,-55)<br>t.setheading(90)<br>t.pendown()<br>t.begin_fill()<br>t.forward(215)<br>t.right(90)<br>t.forward(100)<br>t.right(95)<br>t.forward(195)<br>t.left(90)<br>t.end_fill()<br>t.penup()<\/p>\n\n\n\n<p>In this block of code, we have to&nbsp; initialize the color to yellow and initialize the position to goto(-20,-55). The heading position is 90 i.e North . Here we have drawn the yellow box by using Python turtle module functions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Draw the \u2018S \u2018 letter of the javascript Logo<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted has-vivid-green-cyan-color has-text-color has-background\" style=\"background-color:#ececec\">#Draw the S of the Dell Logo\nt.color(\"white\",\"white\")\nt.pensize(2)\nt.goto(-10,-20)\nt.begin_fill()\nt.setheading(0)\nt.left(15)\nt.pendown()\nt.forward(65)\nt.left(70)\nt.forward(70)\nt.left(90)\nt.left(15)\nt.forward(50)\nt.right(100)\nt.forward(50)\nt.right(90)\nt.forward(50)\nt.left(85)\nt.forward(20)\nt.left(95)\nt.forward(70)\nt.left(90)\nt.forward(90)\nt.left(100)\nt.forward(50)\nt.right(105)\nt.forward(37)\nt.right(75)\nt.forward(50)\nt.left(85)\nt.forward(20)\nt.end_fill()\n<\/pre>\n\n\n\n<p>We have to draw the \u2018 S\u2019 letter of the Javascript logo. Initialized the position to goto(-10,-20). Here we have made use of forward , left and right functions to generate the S letter where forward() is used to move forward a specified distance .left to move left angle and right to move right angle while drawing the S letter of javascript logo i.e JS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Complete Code to Draw Javascript Logo using Python Turtle<\/h2>\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\nt=turtle.Turtle()\nt.penup()\n#set the position of turtle to draw the outline of Logo\nt.goto(-20,-70)\n#set the color\nt.color(\"#F0DB4F\",\"#F0DB4F\")\nt.begin_fill()\nt.pendown()\nt.left(165)\nt.forward(100)\nt.right(70)\nt.forward(220)\nt.setheading(0)\nt.forward(229)\n\nt.penup()\n\nt.goto(-20,-70)\nt.setheading(0)\nt.pendown()\nt.left(15)\nt.forward(100)\nt.left(70)\nt.forward(229)\nt.end_fill()\nt.penup()\n\n#set the position to draw 'J'\nt.goto(-35,-20)\nt.setheading(90)\nt.color(\"white\",\"white\")\nt.pendown()\nt.begin_fill()\nt.forward(150)\nt.left(90)\nt.forward(20)\nt.left(90)\nt.forward(130)\nt.setheading(90)\nt.left(75)\nt.forward(40)\nt.left(110)\nt.forward(20)\n\nt.penup()\nt.goto(-35,-20)\nt.setheading(90)\nt.left(75)\nt.pendown()\nt.forward(60)\nt.end_fill()\nt.penup()\n\n#Draw the yellow box for 's' letter\nt.color(\"yellow\",\"yellow\")\n#Set the position\nt.goto(-20,-55)\nt.setheading(90)\nt.pendown()\nt.begin_fill()\nt.forward(215)\nt.right(90)\nt.forward(100)\nt.right(95)\nt.forward(195)\nt.left(90)\nt.end_fill()\nt.penup()\n\n#Draw the S of the Dell Logo\nt.color(\"white\",\"white\")\nt.pensize(2)\nt.goto(-10,-20)\nt.begin_fill()\nt.setheading(0)\nt.left(15)\nt.pendown()\nt.forward(65)\nt.left(70)\nt.forward(70)\nt.left(90)\nt.left(15)\nt.forward(50)\nt.right(100)\nt.forward(50)\nt.right(90)\nt.forward(50)\nt.left(85)\nt.forward(20)\nt.left(95)\nt.forward(70)\nt.left(90)\nt.forward(90)\nt.left(100)\nt.forward(50)\nt.right(105)\nt.forward(37)\nt.right(75)\nt.forward(50)\nt.left(85)\nt.forward(20)\nt.end_fill()\n\nt.hideturtle()\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-35.png\" alt=\"Output of Javascript Logo using Python Turtle\" class=\"wp-image-10803 lazyload\" width=\"583\" height=\"565\" data-srcset=\"https:\/\/copyassignment.com\/wp-content\/uploads\/2022\/05\/image-35.png 668w, https:\/\/copyassignment.com\/wp-content\/uploads\/2022\/05\/image-35-300x291.png 300w\" data-sizes=\"(max-width: 583px) 100vw, 583px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 583px; --smush-placeholder-aspect-ratio: 583\/565;\" \/><figcaption>Javascript Logo using Python Turtle<\/figcaption><\/figure>\n\n\n\n<p>Here you will see, that we have successfully created the Javascript logo using the Python Turtle module<\/p>\n\n\n\n<p>For more articles like this, keep visiting our website.<\/p>\n\n\n\n<p>Thank you for reading this article.<\/p>\n\n\n\n<div style=\"text-align:center\" class=\"wp-block-atomic-blocks-ab-button ab-block-button\"><a href=\"https:\/\/pythonhub.stores.instamojo.com\/product\/271643\/python-complete-notes\/\" class=\"ab-button ab-button-shape-rounded ab-button-size-medium\" style=\"color:#ffffff;background-color:#3373dc\">Buy Python Handwritten Notes<\/a><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p><strong>Also Read:<\/strong><\/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\/you-can-now-run-ai-fully-offline-on-your-phone-googles-gemma-4-just-changed-everything\/\">You Can Now Run AI Fully Offline on Your Phone \u2014 Google\u2019s Gemma 4 Just Changed Everything<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/i-built-a-24x7-ai-blogging-system-for-wordpress-using-python-free-full-code-inside\/\">I Built a 24\u00d77 AI Blogging System for WordPress Using Python (Free) \u2014 Full Code Inside<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/this-reddit-user-hacked-ai-with-simple-tricks-and-the-results-are-insane\/\">This Reddit User \u201cHacked\u201d AI With Simple Tricks\u2026 And The Results Are Insane<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/one-rm-rf-command-almost-wiped-out-100-million-worth-of-toy-story-2\/\">One \u201crm -rf\u201d Command Almost Wiped Out $100 Million Worth of Toy Story 2<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/how-to-make-money-with-chatgpt-in-2026-a-real-guide-that-still-works\/\">How to Make Money with ChatGPT in 2026: A Real Guide That Still Works<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/picoclaw-vs-openclaw-the-tiny-ai-that-could-replace-powerful-ai-agents\/\">PicoClaw vs OpenClaw: The Tiny AI That Could Replace Powerful AI Agents<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/oracle-layoffs-2026-people-woke-up-to-an-email-and-lost-their-jobs-instantly\/\">Oracle Layoffs 2026: People Woke Up to an Email\u2026 and Lost Their Jobs Instantly<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/x-new-video-update-is-breaking-a-basic-feature-and-users-are-not-happy\/\">X\u2019s New Video Update Is Breaking a Basic Feature \u2014 And Users Are Not Happy<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/the-most-shocking-military-tech-yet-robot-soldiers-that-could-change-warfare-forever\/\">The Most Shocking Military Tech Yet: Robot Soldiers That Could Change Warfare Forever<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/sora-shutdown-the-reality-check-that-shook-ai-video-and-what-comes-next\/\">Sora Shutdown: The Reality Check That Shook AI Video \u2014 And What Comes Next<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/aya-expanse-supports-multiple-languages-for-diverse-global-applications\/\">Aya Expanse supports multiple languages for diverse global applications<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/alibaba-releases-page-agent-on-github-for-public-access\/\">Alibaba releases Page Agent on GitHub for public access<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/google-sheets-gemini-reaches-new-levels-of-performance-and-accuracy\/\">Google Sheets Gemini reaches new levels of performance and accuracy<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/artificial-intelligence-boosts-cardiac-care-in-rural-australian-communities\/\">Artificial intelligence boosts cardiac care in rural Australian communities<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/nvidia-gtc-2026-offers-insights-into-future-artificial-intelligence-developments\/\">NVIDIA GTC 2026 Offers Insights into Future Artificial Intelligence Developments<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/google-deepmind-updates-satellite-embedding-dataset-with-2025-data\/\">Google DeepMind Updates Satellite Embedding Dataset with 2025 Data<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/enhancing-hierarchical-instruction-in-advanced-large-language-models\/\">Enhancing hierarchical instruction in advanced large language models<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/meta-supports-community-development-near-its-data-centers-through-grants\/\">Meta supports community development near its data centers through grants<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/exploring-the-world-of-underwater-robotics-through-coding-techniques\/\">Exploring the world of underwater robotics through coding techniques<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/abb-robotics-partners-with-nvidia-for-large-scale-physical-ai-solutions\/\">ABB Robotics partners with NVIDIA for large scale physical AI solutions<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/why-all-ai-models-are-slowly-becoming-the-same-model\/\">Why All AI Models Are Slowly Becoming the Same Model<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/aam-aadmi-vs-corrupt-system-how-chatgpt-helped-one-guy-expose-govt-fraud-the-story-ravi-and-the-missing-light-pole\/\">Aam Aadmi vs Corrupt System: How ChatGPT Helped One Guy Expose Govt Fraud, The Story: \u201cRavi and The Missing Light Pole\u201d<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/chatgpt-asked-a-person-to-commit-suicide-to-solve-the-problem\/\">ChatGPT Asked a person to commit suicide to solve the problem<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/viral-moment-chinas-agibot-x2-makes-history-with-worlds-first-webster-backflip\/\">Viral Moment: China\u2019s AgiBot X2 Makes History With World\u2019s First Webster Backflip<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/terminator-rising-albania-hands-power-to-ai-echoing-a-nightmare-of-human-extinction\/\">Terminator Rising: Albania Hands Power to AI, Echoing a Nightmare of Human Extinction<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/what-is-albanias-world-first-ai-generated-minister-and-how-does-it-work\/\">What Is Albania\u2019s World-First AI-Generated Minister and How Does It Work?<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/does-chatgpt-believe-in-god-chatgpts-personal-opinion\/\">Does ChatGPT believe in God? ChatGPT&#8217;s Personal Opinion<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/chatgpt-vs-human-the-breath-holding-chat-that-ends-in-system-failure\/\">ChatGPT vs Human: The Breath-Holding Chat That Ends in \u201cSystem Failure\u201d<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/what-is-vibe-coding-the-future-of-no-code-programming-and-its-impact-on-software-developers\/\">What Is Vibe Coding? The Future of No-Code Programming and Its Impact on Software Developers<\/a><\/li>\n<li><a class=\"wp-block-latest-posts__post-title\" href=\"https:\/\/copyassignment.com\/struggling-to-generate-ghibli-style-ai-images-heres-the-real-working-tool-that-others-wont-tell-you-about\/\">Struggling to Generate Ghibli-Style AI Images? Here\u2019s the Real Working Tool That Others Won\u2019t Tell You About!<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Introduction Hello, and welcome friends to learn a new topic today. We are going to draw the Javascript Logo using a python turtle module. It&#8217;s&#8230;<\/p>\n","protected":false},"author":62,"featured_media":10809,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,1067],"tags":[1448,1447,1491,1094],"class_list":["post-10801","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allcategorites","category-python-turtle","tag-12th-class","tag-12th-class-python-project","tag-draw-javascript-logo-using-python-turtle","tag-python-for-kids","wpcat-22-id","wpcat-1067-id"],"_links":{"self":[{"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/posts\/10801","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=10801"}],"version-history":[{"count":0,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/posts\/10801\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/media\/10809"}],"wp:attachment":[{"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/media?parent=10801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/categories?post=10801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/copyassignment.com\/wp-json\/wp\/v2\/tags?post=10801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}