{"id":5532,"date":"2019-11-28T20:31:21","date_gmt":"2019-11-28T20:31:21","guid":{"rendered":"https:\/\/holypython.com\/?p=5532"},"modified":"2021-03-28T00:49:54","modified_gmt":"2021-03-28T00:49:54","slug":"turtle-turbines","status":"publish","type":"post","link":"https:\/\/holypython.com\/turtle-turbines\/","title":{"rendered":"Turtle Turbines"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"5532\" class=\"elementor elementor-5532\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-53b32a8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"53b32a8\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cfc2f91\" data-id=\"cfc2f91\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8b2544a elementor-widget elementor-widget-heading\" data-id=\"8b2544a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><b>Turtle Turbines<\/b><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-eeb1e41 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"eeb1e41\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b341562\" data-id=\"b341562\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1ba2bb1 elementor-widget elementor-widget-text-editor\" data-id=\"1ba2bb1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You can draw nice turbines with Python turtle with the codes in this tutorial.<\/p><p>We will explain how you can twist to code to give more flavor to your drawing as well.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3ce7f6f elementor-widget elementor-widget-image\" data-id=\"3ce7f6f\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"876\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1-1024x876.jpg\" class=\"attachment-large size-large wp-image-5544\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1-1024x876.jpg 1024w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1-300x257.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1-768x657.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1-1536x1314.jpg 1536w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1-600x513.jpg 600w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-1.jpg 1794w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Basic turtle illustration - turbine<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1fba6c0 elementor-widget elementor-widget-html\" data-id=\"1fba6c0\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import turtle\r\n\r\nt = turtle.Turtle()\r\n\r\nfor i in range(10):\r\n    t.forward(200)\r\n    t.right(120)\r\n    t.forward(40)\r\n    t.goto(0,0)\r\n    t.left(84)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-c620ef9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c620ef9\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-339e8ff\" data-id=\"339e8ff\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-94d2462 elementor-widget elementor-widget-heading\" data-id=\"94d2462\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><b>Turtle Pensize<\/b><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-64fb690 elementor-widget elementor-widget-text-editor\" data-id=\"64fb690\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<code>pensize()<\/code> will let you control the thickness of the pen. Look at the code below:\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-997e1df elementor-widget elementor-widget-image\" data-id=\"997e1df\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"878\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3-1024x878.jpg\" class=\"attachment-large size-large wp-image-5550\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3-1024x878.jpg 1024w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3-300x257.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3-768x659.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3-1536x1317.jpg 1536w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3-600x515.jpg 600w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-3.jpg 1769w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Basic turtle illustration - turbine (pensize = 5)<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e7802bd elementor-widget elementor-widget-html\" data-id=\"e7802bd\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import turtle\r\n\r\nt = turtle.Turtle()\r\nt.pensize(5)\r\n\r\nfor i in range(10):\r\n    t.forward(200)\r\n    t.right(120)\r\n    t.forward(40)\r\n    t.goto(0,0)\r\n    t.left(84)\r\n    \r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-93f3fa8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"93f3fa8\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-f696156\" data-id=\"f696156\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8df0ddd elementor-widget elementor-widget-heading\" data-id=\"8df0ddd\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><b>Turtle Colors<\/b><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-813bf3d elementor-widget elementor-widget-text-editor\" data-id=\"813bf3d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Using <code>color()<\/code> you can give your pen a color. Using a list of predefined colors you can loop through the colors with a simple trick. <code>%<\/code> operator will give the remainder from a division.<\/p><p><code>colors[i%6]<\/code> will make sure colors only takes an index from 1 to 6 so each color gets assigned and then the index goes back to zero when i reaches a multiple of 6.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-65f96ac elementor-widget elementor-widget-image\" data-id=\"65f96ac\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"866\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4-1024x866.jpg\" class=\"attachment-large size-large wp-image-5527\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4-1024x866.jpg 1024w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4-300x254.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4-768x649.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4-1536x1298.jpg 1536w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4-600x507.jpg 600w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/Turtle-spiral4.jpg 1875w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Turtle spiral example with color iteration<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8a9869b elementor-widget elementor-widget-html\" data-id=\"8a9869b\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import turtle\r\n\r\ncolors = [\"red\", \"blue\", \"green\", \"gray\", \"orange\", \"black\"]\r\na = turtle.Turtle()\r\n\r\nfor i in range(30):\r\n    a.forward(20+i)\r\n    a.left(30 - i\/1.5)\r\n    a.color(colors[i%6])\r\n\r\nturtle.done()\r\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6fde466 elementor-widget elementor-widget-image\" data-id=\"6fde466\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"902\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2-1024x902.jpg\" class=\"attachment-large size-large wp-image-5548\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2-1024x902.jpg 1024w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2-300x264.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2-768x677.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2-1536x1353.jpg 1536w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2-600x529.jpg 600w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-2.jpg 1713w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Basic turtle illustration - turbine (iterating colors)<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1c66ecf elementor-widget elementor-widget-html\" data-id=\"1c66ecf\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import turtle\r\n\r\nt = turtle.Turtle()\r\ncolors = ['red', 'blue', 'orange', 'green', 'black', 'brown']\r\n\r\nfor i in range(10):\r\n    t.color(colors[i%6])\r\n    t.forward(200)\r\n    t.right(120)\r\n    t.forward(40)\r\n    t.goto(0,0)\r\n    t.left(84)\r\n\r\nturtle.done()<\/code>\r\n<\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-f225f05 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f225f05\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-a67e180\" data-id=\"a67e180\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-13fd8c8 elementor-widget elementor-widget-heading\" data-id=\"13fd8c8\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><b>Combining codes<\/b><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-8b20963 elementor-widget elementor-widget-text-editor\" data-id=\"8b20963\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Let&#8217;s add a post to our turbine so it can rotate one day.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-90dc847 elementor-widget elementor-widget-image\" data-id=\"90dc847\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"863\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4-1024x863.jpg\" class=\"attachment-large size-large wp-image-5551\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4-1024x863.jpg 1024w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4-300x253.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4-768x647.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4-1536x1294.jpg 1536w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4-600x506.jpg 600w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-4.jpg 1881w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Basic turtle illustration - turbine (with the post)<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a7b4112 elementor-widget elementor-widget-html\" data-id=\"a7b4112\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import turtle\r\n\r\nt = turtle.Turtle()\r\ncolors = ['red', 'blue', 'orange', 'green', 'black', 'brown']\r\nt.pensize(20)\r\n\r\nt.goto(0,150)\r\nt.right(90)\r\nt.color('gray')\r\nt.forward(470)\r\n\r\nt.pensize(3)\r\n\r\nt.penup()\r\nt.goto(0,150)\r\nt.pendown()\r\n\r\nfor i in range(10):\r\n    t.color(colors[i%6])\r\n    t.forward(200)\r\n    t.right(120)\r\n    t.forward(40)\r\n    t.goto(0,150)\r\n    t.fillcolor(\"black\")\r\n    t.left(84)\r\n\r\n\r\n\r\nturtle.done()\r\n<\/code>\r\n<\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a9c937a elementor-widget elementor-widget-image\" data-id=\"a9c937a\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"884\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5-1024x884.jpg\" class=\"attachment-large size-large wp-image-5554\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5-1024x884.jpg 1024w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5-300x259.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5-768x663.jpg 768w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5-1536x1326.jpg 1536w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5-600x518.jpg 600w, https:\/\/holypython.com\/wp-content\/uploads\/2019\/11\/python-turbines-5.jpg 1823w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Basic turtle illustration - turbine (more elegant shapes)<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-17fa001 elementor-widget elementor-widget-html\" data-id=\"17fa001\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import turtle\r\n\r\ndef turbase(thickness):\r\n\r\n    t = turtle.Turtle()\r\n    t.pensize(thickness)\r\n    t.color('lightgray')\r\n    t.penup()    \r\n    t.goto(4,0)\r\n    t.pendown()\r\n    t.right(90)\r\n    t.forward(400)\r\n\r\n\r\ndef turwings(thickness, startingdegree):\r\n    t = turtle.Turtle()\r\n    t.pensize(thickness)\r\n    colors = ['red', 'blue', 'orange', 'green', 'black', 'brown']    \r\n    t.color(\"darkblue\")\r\n    i=30\r\n    \r\n    t.penup()\r\n    t.forward(20)\r\n    t.pendown()\r\n    t.right(startingdegree)\r\n    t.forward(300)\r\n    t.left(174)\r\n    t.forward(300)\r\n    \r\n    \r\n    t.right(45)\r\n    t.forward(300)\r\n    t.left(175)\r\n    t.forward(300)\r\n    \r\n    \r\n    t.right(70)\r\n    t.forward(300)\r\n    t.left(175)\r\n    t.forward(300)\r\n    \r\n    t.fillcolor('red')    \r\nturbase(20)\r\nturwings(3, 257.5)\r\nturtle.done()\r\n<\/code>\r\n<\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ce79508 elementor-widget elementor-widget-text-editor\" data-id=\"ce79508\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you enjoyed this Python turtle lesson, feel free to spread it.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Turtle Turbines You can draw nice turbines with Python turtle with the codes in this tutorial. We will explain how you can twist to code to give more flavor to your drawing as well. Basic turtle illustration &#8211; turbine import turtle t = turtle.Turtle() for i in range(10): t.forward(200) t.right(120) t.forward(40) t.goto(0,0) t.left(84) turtle.done() Turtle [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5551,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[42],"tags":[],"class_list":["post-5532","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-turtle"],"acf":[],"_links":{"self":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts\/5532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/comments?post=5532"}],"version-history":[{"count":0,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts\/5532\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media\/5551"}],"wp:attachment":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media?parent=5532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/categories?post=5532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/tags?post=5532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}