{"id":10288,"date":"2020-06-08T15:03:24","date_gmt":"2020-06-08T15:03:24","guid":{"rendered":"https:\/\/holypython.com\/?p=10288"},"modified":"2023-03-13T10:52:24","modified_gmt":"2023-03-13T10:52:24","slug":"turtle-recap-for-learning-python-programming-essentials","status":"publish","type":"post","link":"https:\/\/holypython.com\/turtle-recap-for-learning-python-programming-essentials\/","title":{"rendered":"Turtle Recap for Learning Python Programming Essentials"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10288\" class=\"elementor elementor-10288\">\n\t\t\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<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-46c9040 elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"46c9040\" 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-50 elementor-inner-column elementor-element elementor-element-fce6fd7\" data-id=\"fce6fd7\" 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-e696e0b elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"e696e0b\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-code\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\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<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-93ca6f1\" data-id=\"93ca6f1\" 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-50e45f8 elementor-widget elementor-widget-heading\" data-id=\"50e45f8\" 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\">Turtle Recap for Python Programming Essentials<\/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-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>Some people think turtle is such a waste of time. We don\u2019t find these claims to be mature or grounded.<\/p><p>Most people only use turtle as a constructive fun activity or means to practice. With its visual output it\u2019s probably reinforcing the learning process in the brain too.<\/p><p>Do you remember how you learned swimming? Hopefully, you know how to swim since it can be a life saver, literally. You do not go around thinking oh I didn\u2019t pass across Atlantic Ocean when I was learning swimming today do you? So, when we talk about turtle it\u2019s just a beautiful stepping tone in a beautiful learning process.<\/p><p>Also at the bottom of this article you can see a list of free <b>Python Exercises<\/b> that are relevant to the programming concepts discussed here. It&#8217;s always a good idea to supplement your programming skills.<\/p><p>So, what can you practice with turtle? Here are some ideas:<\/p><ul><li>Loops<\/li><li>Python Operators<\/li><li>Conditional Statements<\/li><li>User-defined Functions<\/li><li>Classes<\/li><li>Data Types<\/li><li>User Input<\/li><\/ul>\t\t\t\t\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-132f773 elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"132f773\" 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-50 elementor-inner-column elementor-element elementor-element-c5abca3\" data-id=\"c5abca3\" 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-df79e81 elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"df79e81\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-code\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\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<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-d3ed5d9\" data-id=\"d3ed5d9\" 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-8865ab0 elementor-widget elementor-widget-heading\" data-id=\"8865ab0\" 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\">How to start drawing with Python Turtle (Basics)<\/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-f1c0724 elementor-widget elementor-widget-text-editor\" data-id=\"f1c0724\" 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 start with baby steps and build up. To draw with turtle we will need these steps:<\/p><ol><li>import turtle<\/li><li>create and assign a turtle instance<\/li><li>make turtle rotate and move using:<ul><li>forward or backward<\/li><li>left or right<\/li><\/ul><\/li><li>terminate turtle operation (for convenience)<\/li><\/ol>\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-af22c0e elementor-widget elementor-widget-html\" data-id=\"af22c0e\" 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\nt.forward(25)\r\nt.left(60)\r\nt.forward(45)\r\n\r\n\r\nturtle.done()<\/code><\/pre>\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=\"252\" height=\"283\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/turtle-basic-drawing.png\" class=\"attachment-full size-full wp-image-10303\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Turtle drawing basics with Python<\/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-fc5aa73 elementor-widget elementor-widget-text-editor\" data-id=\"fc5aa73\" 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>Now we know how to create turtle and make it move as we want, let&#8217;s get a little more creative.<\/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-592ea58 elementor-widget elementor-widget-image\" data-id=\"592ea58\" 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=\"313\" height=\"312\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/b17da220-e19a-4e98-8165-dfa559ff74d9.jpg\" class=\"attachment-full size-full wp-image-10299\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/b17da220-e19a-4e98-8165-dfa559ff74d9.jpg 313w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/b17da220-e19a-4e98-8165-dfa559ff74d9-300x300.jpg 300w, https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/b17da220-e19a-4e98-8165-dfa559ff74d9-150x150.jpg 150w\" sizes=\"(max-width: 313px) 100vw, 313px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Turtle pattern with different 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-32384f4 elementor-widget elementor-widget-text-editor\" data-id=\"32384f4\" 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>It&#8217;s so amazing how geometry is embedded in life whether it&#8217;s a plant seed, a flower, a bird&#8217;s wings or supermassive galaxies. We see 6 repetitive patterns in the image, let&#8217;s see what involves creating one single piece of the pattern.<\/p><p>AJ Gentile has a very impressive and informative video suggesting we are in a simulation and the it&#8217;s no coincidence some ratios such as Fibonacci sequence appears in so many places in nature because it is how life was coded by the creator of the simulation.<\/p><p>The video mentions how researchers from University of Washington were able to discover methods to embed computer codes in DNA.<\/p><p>The video below is embedded in this page from the time it mentioned the code in life.<\/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-c2199b4 elementor-widget elementor-widget-heading\" data-id=\"c2199b4\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Computer code writ in the fabric of the cosmos...<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3020866 elementor-widget elementor-widget-video\" data-id=\"3020866\" data-element_type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=4wMhXxZ1zNM&quot;,&quot;start&quot;:541,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\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-bcec0ce elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"bcec0ce\" 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-50 elementor-inner-column elementor-element elementor-element-e8ca423\" data-id=\"e8ca423\" 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-0c019ab elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"0c019ab\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-code\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\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<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-04f6fdc\" data-id=\"04f6fdc\" 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-b417577 elementor-widget elementor-widget-heading\" data-id=\"b417577\" 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\">Learning fundamental programming concepts with Python Turtle<\/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-48c1cef elementor-widget elementor-widget-text-editor\" data-id=\"48c1cef\" 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>When a person is learning programming, there are a few main concepts that are parallel in different programming languages. These concepts are not only much more simplified and syntax-minimal in Python but also there is a fancy drawing library that can be used to demonstrate each one of these vital concepts.<\/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-fd6130a elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"fd6130a\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Loops (<i>For & While<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\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>Code snippet below includes a simple for loop to create a snail shell like spiral shape.<\/p><ul><li>It uses 40 iterations with the help of range function: (<code>range(40)<\/code>)<\/li><li>turtle steps are increasingly smaller. This is made possible by taking a fixed value; 15 and subtracting one third of the iteration number from it: <code>t.forward(15-i\/3)<\/code><\/li><li>Finally, turtle is made turn left with increasingly higher angles, again using the help of iteration number (i) (<code>t.left(i*2+i\/9)<\/code>)<\/li><\/ul>\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-f9eac24 elementor-widget elementor-widget-text-editor\" data-id=\"f9eac24\" 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 read more about <code>for loops<\/code> <a href=\"https:\/\/holypython.com\/intermediate-python-lessons\/lesson-8-python-for-loop\/\">here<\/a>.<\/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-dfa1834 elementor-widget elementor-widget-html\" data-id=\"dfa1834\" 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(40):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-af3c6e7 elementor-widget elementor-widget-image\" data-id=\"af3c6e7\" 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=\"216\" height=\"164\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/snail-shape-turtle.png\" class=\"attachment-full size-full wp-image-10304\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Simple Turtle Spiral<\/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-43f7465 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"43f7465\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Data Type Conversion (<i>Dictionaries, Strings, Integers and Lists<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-71f19ee elementor-widget elementor-widget-text-editor\" data-id=\"71f19ee\" 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 look at the same example by using strings of numbers, which will provide preparation for user inputs.<\/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-74a6062 elementor-widget elementor-widget-html\" data-id=\"74a6062\" 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\nparameters={\"iterations\":\"40\",\"fixed_step\":\"15\"]\r\nfor i in range(int(parameters[\"iterations\"])):\r\n    t.forward(int(parameters[\"fixed_step\"])-i\/3)\r\n    t.left(i*2+i\/9)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3747ec0 elementor-widget elementor-widget-text-editor\" data-id=\"3747ec0\" 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>Here are refresher lessons about <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-3-data-types\/\">Python Type Conversion<\/a>, <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-8-python-dictionaries\/\">Python Dictionaries,<\/a> <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-6-python-lists\/\">Lists<\/a>, and <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-9-python-strings\/\">strings<\/a>.<\/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-e62a9fd elementor-widget elementor-widget-image\" data-id=\"e62a9fd\" 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=\"295\" height=\"207\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/turtle-with-different-parameters.png\" class=\"attachment-full size-full wp-image-10306\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Turtle with different parameters<\/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-29af049 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"29af049\" 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<h3 class=\"elementor-heading-title elementor-size-default\">User Input (<i>input function<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e4f727e elementor-widget elementor-widget-text-editor\" data-id=\"e4f727e\" 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>User input is a cool way to get user&#8217;s input in Python. One caveat is that it always returns values in strings. This means regardless of what the user enters, letters, numbers or symbols, it will be returned in <code>string<\/code> format as below:<\/p><ul><li>&#8220;John&#8221;<\/li><li>&#8220;45&#8221;<\/li><li>&#8220;&amp;^*$&#8221;<\/li><\/ul><p>In case you&#8217;re looking for a numerical input from the user you might need to convert it to <code>int<\/code> format in order to use it.<\/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-ec29994 elementor-widget elementor-widget-text-editor\" data-id=\"ec29994\" 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>Here is a lesson about <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-13-input\/\">User Inputs with Python<\/a>.<\/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-c19793c elementor-widget elementor-widget-html\" data-id=\"c19793c\" 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\nparameter=input(\"Please enter iteration amount\")\r\nt = turtle.Turtle()\r\n\r\nfor i in range(int(parameter)):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eec6ba7 elementor-widget elementor-widget-text-editor\" data-id=\"eec6ba7\" 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>Code above demonstrates a user input connected to a turtle which operates with a loop. <code>Int<\/code> <b>function<\/b>\u00a0is also used to convert input&#8217;s string value to integer. At least 4 major concepts in a small turtle example. Let&#8217;s say user entered <b>10<\/b>\u00a0after he was prompted &#8220;Please enter iteration amount&#8221;, you&#8217;d get the shape below:<\/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-7a4a771 elementor-widget elementor-widget-image\" data-id=\"7a4a771\" 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=\"244\" height=\"105\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/turtle-10-iteration.png\" class=\"attachment-full size-full wp-image-10496\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Turtle for loop after 10 iterations<\/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-528e89c elementor-widget elementor-widget-text-editor\" data-id=\"528e89c\" 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 make another turtle example with user input. Let&#8217;s add some color to the turtle using <code>.color()<\/code> method.<\/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-fcb28fa elementor-widget elementor-widget-html\" data-id=\"fcb28fa\" 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\nparameter=input(\"Please enter a color\")\r\n\r\nt = turtle.Turtle()\r\nt.color(parameter)\r\n\r\nfor i in range(40):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e34eb32 elementor-widget elementor-widget-text-editor\" data-id=\"e34eb32\" 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>In the event that user enters brown, we will get a shape similar to this:<\/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-586996f elementor-widget elementor-widget-image\" data-id=\"586996f\" 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=\"179\" height=\"125\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/snail-shape-turtle-in-brown.jpg\" class=\"attachment-full size-full wp-image-10504\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Turtle for loop after 10 iterations<\/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-c644fab elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"c644fab\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Python Operators (<i>if, elif, else<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9b80a35 elementor-widget elementor-widget-text-editor\" data-id=\"9b80a35\" 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>We&#8217;ve already used Python operators many times up to this point in this article. Operators mainly used are assignment operator (<code>=<\/code>) and some of the arithmetic operators (<code>+, -, *, \/<\/code>)<\/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-b3a3c53 elementor-widget elementor-widget-text-editor\" data-id=\"b3a3c53\" 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 see a great detail about Python Operators in this lesson <a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-18-python-operators\/\">here<\/a>.<\/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-3bd2398 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"3bd2398\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Lists (<i>Color Scale Example<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-28ff170 elementor-widget elementor-widget-text-editor\" data-id=\"28ff170\" 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>It can be exciting to change turtle&#8217;s color on the go so we can end up with multi-color drawings.<\/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-2dbea2c elementor-widget elementor-widget-html\" data-id=\"2dbea2c\" 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\nlst=[\"red\", \"blue\",\"brown\",\"pink\",\"gray\",\"yellow\"]\r\n\r\nfor i in range(40):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n    t.color(lst[i%6])\r\n    \r\nt.left(-120)\r\nfor i in range(40):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n    t.color(lst[i%6])\r\n\r\nt.left(-120)\r\nfor i in range(40):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n    t.color(lst[i%6])\r\n\r\nt.left(-120)\r\nfor i in range(40):\r\n    t.forward(15-i\/3)\r\n    t.left(i*2+i\/9)\r\n    t.color(lst[i%6])\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d6d2d60 elementor-widget elementor-widget-image\" data-id=\"d6d2d60\" 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=\"263\" height=\"240\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/multicolor-turtle-pattern.jpg\" class=\"attachment-full size-full wp-image-10509\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Multicolor turtle pattern<\/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-e20cdf3 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"e20cdf3\" 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<h3 class=\"elementor-heading-title elementor-size-default\">User Defined Functions (<i>def t_draw():<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5749b66 elementor-widget elementor-widget-text-editor\" data-id=\"5749b66\" 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>So, as you can notice from the last piece of code above, it&#8217;s starting to get messy already. We just created 4 turtle loops, added some color and that was enough for the code to start getting repetitive and tedious.<\/p><p>This is brilliant though for the sake of demonstration. Functions and classes are superb object structures that can help us create repeatable code with structure.<\/p><p>let&#8217;s attempt to create a function that creates 1 piece of our turtle pattern above:<\/p><p>\u00a0<\/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-a1334e8 elementor-widget elementor-widget-html\" data-id=\"a1334e8\" 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\ndef t_draw():\r\n    lst=[\"red\", \"blue\",\"brown\",\"pink\",\"gray\",\"yellow\"]\r\n    for i in range(40):\r\n   \r\n        t.forward(15-i\/3)\r\n        t.left(i*2+i\/9)\r\n        t.color(lst[i%6])\r\n    t.left(-120)\r\n\r\n\r\nt_draw()\r\nt_draw()\r\nt_draw()\r\nt_draw()\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c4df9c5 elementor-widget elementor-widget-text-editor\" data-id=\"c4df9c5\" 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 play with the color algorithm a little bit so that instead of every turtle step, color changes at every different loop.<\/p><p>We will add a parameter called <b>&#8220;j&#8221; <\/b>to the function <b>t_draw <\/b>and call the function with different j values pointing to the list of colors.<\/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-6f2b34c elementor-widget elementor-widget-html\" data-id=\"6f2b34c\" 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\ndef t_draw(j):\r\n    lst=[\"red\", \"blue\",\"brown\",\"pink\",\"gray\",\"yellow\"]\r\n    for i in range(40):        \r\n        t.forward(15-i\/3)\r\n        t.left(i*2+i\/9)\r\n        t.color(lst[j])\r\n    t.left(-120)\r\n\r\nt_draw(0)\r\nt_draw(1)\r\nt_draw(2)\r\nt_draw(3)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-56c8cb1 elementor-widget elementor-widget-image\" data-id=\"56c8cb1\" 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=\"256\" height=\"248\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2020\/06\/turtle-multicolor-2.jpg\" class=\"attachment-full size-full wp-image-10512\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Multicolor turtle pattern<\/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-1d041a9 elementor-widget elementor-widget-text-editor\" data-id=\"1d041a9\" 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><a href=\"https:\/\/holypython.com\/beginner-python-lessons\/lesson-16-defining-functions\/\">How to define functions in Python<\/a>.<\/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-510cf0d elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"510cf0d\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Conditional Statements (if, elif, else) (<i>Color \/ B&W<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-529c4f2 elementor-widget elementor-widget-text-editor\" data-id=\"529c4f2\" 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>Now let&#8217;s implement a conditional statement using <strong>if and else.<\/strong><\/p><p>Let&#8217;s make a user input so that user has 2 options:<\/p><p>bw: (standing for black&amp;white)<\/p><p>c: (standing for color)<\/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-4213481 elementor-widget elementor-widget-html\" data-id=\"4213481\" 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\ndef t_draw(j, c_mode):\r\n    lst=[\"red\", \"blue\",\"brown\",\"pink\",\"gray\",\"yellow\",\"black\"]\r\n    for i in range(40):        \r\n        t.forward(15-i\/3)\r\n        t.left(i*2+i\/9)\r\n        if c_mode==\"bw\":\r\n            t.color(lst[-1])\r\n        else:\r\n            t.color(lst[j])\r\n    t.left(-120)\r\n\r\nc_mode=input(\"Please make a choice: 'bw' or 'c'\")\r\nt_draw(0,c_mode)\r\nt_draw(1,c_mode)\r\nt_draw(2,c_mode)\r\nt_draw(3,c_mode)\r\n\r\nturtle.done()<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ffa7651 elementor-widget elementor-widget-text-editor\" data-id=\"ffa7651\" 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><a href=\"https:\/\/holypython.com\/intermediate-python-lessons\/lesson-7-python-conditional-statements\/\">Lesson<\/a> for Python Conditional Statements.<\/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-5531175 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"5531175\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Python Classes<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21e271d elementor-widget elementor-widget-text-editor\" data-id=\"21e271d\" 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>We&#8217;ll leave this one to you. Can you think of ways to implement a user defined class to make this turtle example even more sophisticated?<\/p><p>Feel free to brush up on your Python class knowledge with these <a href=\"https:\/\/holypython.com\/advanced-python-exercises\/exercise-4-classes\/\">class exercises here<\/a>.<\/p>\t\t\t\t\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-9be9b39 elementor-section-content-middle elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9be9b39\" 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-50 elementor-inner-column elementor-element elementor-element-60a9555\" data-id=\"60a9555\" 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-a2f16cb elementor-view-default elementor-widget elementor-widget-icon\" data-id=\"a2f16cb\" data-element_type=\"widget\" data-widget_type=\"icon.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-icon-wrapper\">\n\t\t\t<div class=\"elementor-icon\">\n\t\t\t<i aria-hidden=\"true\" class=\"fas fa-code\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\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<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-3d16c7f\" data-id=\"3d16c7f\" 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-ff7af8c elementor-widget elementor-widget-heading\" data-id=\"ff7af8c\" 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\">Finishing Thoughts<\/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-dd5681b elementor-widget elementor-widget-text-editor\" data-id=\"dd5681b\" 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>So, turtle can be a fun way to learn Python. It&#8217;s good to keep in mind that turtle is rather a learning concept than a tool to build things. But so what, as long as you have a purpose and aligned expectations there is nothing wrong with some fun turtle time while incredibly boosting your learning performance!<\/p><p>If you know what you want, if you know what turtle is and if you know what you can get from it, it will never be a waste of time.<\/p><p>Maybe a good thing to understand is that we can&#8217;t expect a baby to write a literature masterpiece but the baby still has to learn, practice and have fun. So take the time you need while learning programming and let&#8217;s realize that we are lucky to have Python turtle and all the amazing tech opportunities we have in 21st century! Again, turtle is just another method to supplement our learning journey in a fun and creative way.<\/p><p>Enjoy!<\/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<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2a9ca3a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2a9ca3a\" 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-609ddc4\" data-id=\"609ddc4\" 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-a99fbd5 elementor-widget__width-auto elementor-widget elementor-widget-heading\" data-id=\"a99fbd5\" 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<h3 class=\"elementor-heading-title elementor-size-default\">Suggested Python Exercises (<i>Relevant to this article<\/i>)<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b6dded7 elementor-widget elementor-widget-text-editor\" data-id=\"b6dded7\" 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>Finally, here are some progressively challenging exercises for the relevant topics mentioned in this post. In case you find yourself to be struggling with some of the concepts, diving into some exercises is a great method to master these concepts. The list goes:<\/p><ul><li><a href=\"https:\/\/holypython.com\/intermediate-python-exercises\/exercise-8-python-for-loop\/\">Python For Loop Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/intermediate-python-exercises\/exercise-9-python-while-loop\/\">Python While Loop Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-18-python-operators\/\">Python Operator Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/intermediate-python-exercises\/exercise-7-conditional-statements\/\">Python if-elif-else Exercises (Conditional Statement)<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-16-defining-functions\/\">Python User-defined Function Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-3-python-data-types\/\">Python Data Type Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-2-python-variables\/\">Python Variable Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-5-data-structures\/\">Python Data Structure Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-4-python-type-conversions\/\">Python Data Type Conversion Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/intermediate-python-exercises\/exercise-16-python-list-comprehensions\/\">Python List Comprehension Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/intermediate-python-exercises\/exercise-17-python-dict-comprehensions\/\">Python Dict Comprehension Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-13-input-function\/\">Python User Input Exercises<\/a><\/li><li><a href=\"https:\/\/holypython.com\/beginner-python-exercises\/exercise-14-range-function\/\">Python range() function Exercises<\/a><\/li><\/ul>\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 Recap for Python Programming Essentials Some people think turtle is such a waste of time. We don\u2019t find these claims to be mature or grounded. Most people only use turtle as a constructive fun activity or means to practice. With its visual output it\u2019s probably reinforcing the learning process in the brain too. Do [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10529,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[52,42],"tags":[],"class_list":["post-10288","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-turtle"],"acf":[],"_links":{"self":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts\/10288","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=10288"}],"version-history":[{"count":0,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/posts\/10288\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media\/10529"}],"wp:attachment":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media?parent=10288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/categories?post=10288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/tags?post=10288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}