<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Ak's Blog]]></title><description><![CDATA[Ak's Blog]]></description><link>https://hashnode.abhinabkhanal.com.np</link><generator>RSS for Node</generator><lastBuildDate>Fri, 05 Jun 2026 22:08:46 GMT</lastBuildDate><atom:link href="https://hashnode.abhinabkhanal.com.np/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Beautiful Spirographs With Python!]]></title><description><![CDATA[This is what I encountered almost by mistake while learning about loops in python. Its wonderful what you can achieve with just two nested loops.
import turtle
import random
turtle.screensize(2160,1440)
turtle.colormode(255)
turtle.speed(0)
turtle.tr...]]></description><link>https://hashnode.abhinabkhanal.com.np/beautiful-spirographs-with-python</link><guid isPermaLink="true">https://hashnode.abhinabkhanal.com.np/beautiful-spirographs-with-python</guid><category><![CDATA[python beginner]]></category><dc:creator><![CDATA[Abhinab Khanal]]></dc:creator><pubDate>Mon, 01 Nov 2021 14:14:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1635775759367/KIWjWuYCn.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This is what I encountered almost by mistake while learning about loops in python. Its wonderful what you can achieve with just two nested loops.</p>
<pre><code><span class="hljs-attribute">import</span> turtle
<span class="hljs-attribute">import</span> random
<span class="hljs-attribute">turtle</span>.screensize(<span class="hljs-number">2160</span>,<span class="hljs-number">1440</span>)
<span class="hljs-attribute">turtle</span>.colormode(<span class="hljs-number">255</span>)
<span class="hljs-attribute">turtle</span>.speed(<span class="hljs-number">0</span>)
<span class="hljs-attribute">turtle</span>.tracer(<span class="hljs-number">0</span>,<span class="hljs-number">0</span>)
<span class="hljs-attribute">for</span> i in range (<span class="hljs-number">17</span>):
    <span class="hljs-attribute">for</span> i in range(<span class="hljs-number">10</span>):
        <span class="hljs-attribute">R</span>=random.randint(<span class="hljs-number">1</span>,<span class="hljs-number">120</span>)
        <span class="hljs-attribute">g</span>=random.randint(<span class="hljs-number">1</span>,<span class="hljs-number">120</span>)
        <span class="hljs-attribute">b</span>=random.randint(<span class="hljs-number">1</span>,<span class="hljs-number">120</span>)
        <span class="hljs-attribute">turtle</span>.update()
        <span class="hljs-attribute">for</span> i in range(<span class="hljs-number">75</span>):
            <span class="hljs-attribute">turtle</span>.pencolor(R,g,b)
            <span class="hljs-attribute">turtle</span>.forward(<span class="hljs-number">50</span>)
            <span class="hljs-attribute">turtle</span>.left(<span class="hljs-number">45</span>)
            <span class="hljs-attribute">turtle</span>.right(<span class="hljs-number">20</span>)
            <span class="hljs-attribute">turtle</span>.forward(<span class="hljs-number">20</span>)
        <span class="hljs-attribute">turtle</span>.left(<span class="hljs-number">160</span>)
        <span class="hljs-attribute">turtle</span>.forward(<span class="hljs-number">30</span>)
</code></pre><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1635775840726/GiozeEr8I.png" alt="Masterpiece.png" /></p>
<p>Checkout some more patterns... github.com/Akhero47/Pythonpatterns</p>
]]></content:encoded></item></channel></rss>