<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Trinket &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:Trinket</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 16:44:30 +0000</pubDate>
    <item>
      <title>Code Club - Trinket and python Modules</title>
      <link>https://personaljournal.ca/paulsutton/code-club-trinket-and-python-modules</link>
      <description>&lt;![CDATA[Code Club - Trinket and python Modules&#xA;&#xA;Trinket allows you to use a number of different modules to add functionality to your programs.&#xA;&#xA;Code Club have added a py5 module for their own projects.  So this post will examine how to add one of the available libraries to your program.&#xA;&#xA;Firstly a list of the modules that Trinket.io provides can be found here. along with some documentation for each.&#xA;&#xA;builtins&#xA;math&#xA;matplotlib.pyplot&#xA;numpy&#xA;operator&#xA;processing&#xA;random&#xA;string&#xA;time&#xA;turtle&#xA;pygal&#xA;re&#xA;urllib.request&#xA;&#xA;So to add a module we need to use the import command.  &#xA;&#xA;Start with a blank new Python 3 project  and enter the following&#xA;&#xA;#!/usr/bin/env python3 #use python 3&#xA;Then the instruction to import the required module.&#xA;import numpy&#xA;&#xA;Now test if you don&#39;t get errors proceed to add&#xA;&#xA;from numpy import *&#xA;And test again. &#xA;&#xA;iframe src=&#34;https://trinket.io/embed/python3/5e0497e6e3?runOption=run&#34; width=&#34;100%&#34; height=&#34;356&#34; frameborder=&#34;0&#34; marginwidth=&#34;0&#34; marginheight=&#34;0&#34; allowfullscreen/iframe&#xA;&#xA;Should give no errors, in which case you can now start to use module numpy&#xA;&#xA;Other info&#xA;&#xA;You can use modules such as Numpy and matplotlib in software such as Jupyter Notebook&#xA;&#xA;Tags&#xA;&#xA;#Python,#Trinket,#Modules,#HowTo,#CodeClub&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Code Club – Trinket and python Modules</p>

<p>Trinket allows you to use a number of different modules to add functionality to your programs.</p>

<p>Code Club have added a py5 module for their own projects.  So this post will examine how to add one of the available libraries to your program.</p>

<p>Firstly a list of the modules that Trinket.io provides can be <a href="https://trinket.io/docs/python" rel="nofollow">found here</a>. along with some documentation for each.</p>
<ul><li>builtins</li>
<li><a href="https://docs.python.org/3/library/math.html" rel="nofollow">math</a></li>
<li><a href="https://matplotlib.org/stable/tutorials/introductory/pyplot.html" rel="nofollow">matplotlib.pyplot</a></li>
<li><a href="https://numpy.org/" rel="nofollow">numpy</a></li>
<li><a href="https://docs.python.org/3/library/operator.html" rel="nofollow">operator</a></li>
<li><a href="https://py.processing.org/" rel="nofollow">processing</a></li>
<li><a href="https://docs.python.org/3/library/random.htm" rel="nofollow">random</a></li>
<li><a href="https://docs.python.org/3/library/string.html" rel="nofollow">string</a></li>
<li><a href="https://docs.python.org/3/library/time.html" rel="nofollow">time</a></li>
<li><a href="https://docs.python.org/3/library/turtle.html" rel="nofollow">turtle</a></li>
<li>pygal</li>
<li>re</li>
<li>urllib.request</li></ul>

<p>So to add a module we need to use the import command.</p>

<p>Start with a blank new <em>Python 3</em> project  and enter the following</p>

<pre><code>#!/usr/bin/env python3 #use python 3
</code></pre>

<p>Then the instruction to import the required module.</p>

<pre><code>import numpy
</code></pre>

<p>Now test if you don&#39;t get errors proceed to add</p>

<pre><code>from numpy import *
</code></pre>

<p>And test again.</p>

<iframe src="https://trinket.io/embed/python3/5e0497e6e3?runOption=run" height="356" frameborder="0" allowfullscreen=""></iframe>

<p>Should give no errors, in which case you can now start to use module numpy</p>

<p><strong>Other info</strong></p>

<p>You can use modules such as Numpy and matplotlib in software such as <a href="https://jupyter.org/" rel="nofollow">Jupyter Notebook</a></p>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Python</span></a>,<a href="/paulsutton/tag:Trinket" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Trinket</span></a>,<a href="/paulsutton/tag:Modules" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Modules</span></a>,<a href="/paulsutton/tag:HowTo" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">HowTo</span></a>,<a href="/paulsutton/tag:CodeClub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">CodeClub</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/code-club-trinket-and-python-modules</guid>
      <pubDate>Sun, 04 Jun 2023 06:00:00 +0000</pubDate>
    </item>
    <item>
      <title>Code Club 6/5/2023 Write up</title>
      <link>https://personaljournal.ca/paulsutton/code-club-6-5-2023-write-up</link>
      <description>&lt;![CDATA[Code Club 6/5/2023 Write up&#xA;&#xA;We had a lower turnout today, probably due to the coronation.  Nevertheless we were actually very productive.&#xA;&#xA;A new member started off with the Free code camp course on scientific computing,  which is mostly video with  Q&amp;A.    This really good, but not very interactive so we moved on to the Code Club Python activities &#xA;&#xA;Using trinket to create a program to simulate rolling a dice&#xA;&#xA;iframe src=&#34;https://trinket.io/embed/python/9468e0d25b&#34; width=&#34;100%&#34; height=&#34;356&#34; frameborder=&#34;0&#34; marginwidth=&#34;0&#34; marginheight=&#34;0&#34; allowfullscreen/iframe&#xA;&#xA;This worked much better, so we they are going to carry on at home, them come back next week to the STEM group.&#xA;&#xA;Useful Links&#xA;&#xA;Beginner Level&#xA;&#xA;Code Club&#xA;Raspberry Pi / Code Club Projects&#xA;   Scratch&#xA;Snap Blocks&#xA;Code.org&#xA;Compute-it&#xA;&#xA;Next event&#xA;&#xA;13th March - STEM Group 11 - 15:00&#xA;20th March - Code Club 10 - 12:00&#xA;&#xA;New people welcome, as a group we can all learn together and support each other.&#xA;&#xA;It would recommend getting accounts with the following, and bringing the details with you.  A parent / guardian may need their phone to help facilitate logins. &#xA;&#xA;Trinket - so you can save work&#xA;Code Club / Raspberry Pi foundatio - You can then save and keep track of progress through activities. &#xA;&#xA;Tags&#xA;&#xA;#CodeClub,#Scratch,#Coding,#Hacking,#Python,#Trinket,&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Code Club 6/5/2023 Write up</p>

<p>We had a lower turnout today, probably due to the coronation.  Nevertheless we were actually very productive.</p>

<p>A new member started off with the <a href="https://www.freecodecamp.org/learn/scientific-computing-with-python/#python-for-everybody" rel="nofollow">Free code camp course</a> on scientific computing,  which is mostly video with  Q&amp;A.    This really good, but not very interactive so we moved on to the <a href="https://projects.raspberrypi.org/en/projects/hello-world" rel="nofollow">Code Club Python activities</a></p>

<p>Using trinket to create a program to simulate rolling a dice</p>

<iframe src="https://trinket.io/embed/python/9468e0d25b" height="356" frameborder="0" allowfullscreen=""></iframe>

<p>This worked much better, so we they are going to carry on at home, them come back next week to the STEM group.</p>

<p><strong>Useful Links</strong></p>

<p><em>Beginner Level</em></p>
<ul><li><a href="https://www.codeclub.org.uk" rel="nofollow">Code Club</a></li>
<li><a href="https://projects.raspberrypi.org/en/projects" rel="nofollow">Raspberry Pi / Code Club Projects</a>
<ul><li><a href="https://www.scratch.mit.edu" rel="nofollow">Scratch</a></li></ul></li>
<li><a href="https://snap.berkeley.edu/" rel="nofollow">Snap Blocks</a></li>
<li><a href="https://code.org/" rel="nofollow">Code.org</a></li>
<li><a href="https://compute-it.toxicode.fr/" rel="nofollow">Compute-it</a></li></ul>

<p><strong>Next event</strong></p>

<p>13th March – STEM Group 11 – 15:00
20th March – Code Club 10 – 12:00</p>

<p>New people welcome, as a group we can all learn together and support each other.</p>

<p>It would recommend getting accounts with the following, and bringing the details with you.  A parent / guardian may need their phone to help facilitate logins.</p>
<ul><li><a href="https://trinket.io/" rel="nofollow">Trinket</a> – so you can save work</li>
<li><a href="https://codeclub.org/en/clubs/062d87c8-01a3-4181-ac7b-4384907aebde" rel="nofollow">Code Club / Raspberry Pi foundatio</a> – You can then save and keep track of progress through activities.</li></ul>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:CodeClub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">CodeClub</span></a>,<a href="/paulsutton/tag:Scratch" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Scratch</span></a>,<a href="/paulsutton/tag:Coding" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Coding</span></a>,<a href="/paulsutton/tag:Hacking" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Hacking</span></a>,<a href="/paulsutton/tag:Python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Python</span></a>,<a href="/paulsutton/tag:Trinket" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Trinket</span></a>,</p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/code-club-6-5-2023-write-up</guid>
      <pubDate>Sat, 06 May 2023 14:22:11 +0000</pubDate>
    </item>
    <item>
      <title>More Trinket Coding</title>
      <link>https://personaljournal.ca/paulsutton/more-trinket-coding</link>
      <description>&lt;![CDATA[More Trinket Coding&#xA;&#xA;Trinket is a web based development platform.  One of it&#39;s features is the programming language blocks, which is in fact a block based front end and creates Python programs.&#xA;&#xA;I am sharing these on my blog today, even though I also shared earlier in the week on LinkedIn and also on Twitteras part of the Paignton Library Virtual Code Club.  &#xA;&#xA;Drawing a circle&#xA;&#xA;circle1&#xA;&#xA;And the associated output &#xA;&#xA;circle1&#xA;&#xA;Drawing a star&#xA;&#xA;star1&#xA;&#xA;And the associated output&#xA;&#xA;star2&#xA;&#xA;I am working on a book to update my previous Nested loops guide I wrote a few years ago.  This needed updating anyway so it would cover Scratch 3.0.  This book / guide is work in progress, and will be typeset in $\LaTeX$ using Overleaf&#xA;&#xA;#programming, #trinket, #Blocks, #python, #WebIDE, #LaTeX, #Overleaf, #nestedloops, #loops, #codeclub&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>More Trinket Coding</p>

<p><a href="https://www.trinket.io" rel="nofollow">Trinket</a> is a web based development platform.  One of it&#39;s features is the programming language blocks, which is in fact a block based front end and creates Python programs.</p>

<p>I am sharing these on my blog today, even though I also shared earlier in the week on LinkedIn and also on Twitteras part of the Paignton Library Virtual Code Club.</p>

<p><strong>Drawing a circle</strong></p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/circle1.png" alt="circle1"></p>

<p>And the associated output</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/circle1out.png" alt="circle1"></p>

<p><strong>Drawing a star</strong></p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/star1.png" alt="star1"></p>

<p>And the associated output</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/star2out.png" alt="star2"></p>

<p>I am working on a book to update my previous Nested loops guide I wrote a few years ago.  This needed updating anyway so it would cover Scratch 3.0.  This book / guide is work in progress, and will be typeset in $\LaTeX$ using <a href="https://www.overleaf.com" rel="nofollow">Overleaf</a></p>

<p><a href="/paulsutton/tag:programming" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">programming</span></a>, <a href="/paulsutton/tag:trinket" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">trinket</span></a>, <a href="/paulsutton/tag:Blocks" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Blocks</span></a>, <a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>, <a href="/paulsutton/tag:WebIDE" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">WebIDE</span></a>, <a href="/paulsutton/tag:LaTeX" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">LaTeX</span></a>, <a href="/paulsutton/tag:Overleaf" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Overleaf</span></a>, <a href="/paulsutton/tag:nestedloops" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">nestedloops</span></a>, <a href="/paulsutton/tag:loops" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">loops</span></a>, <a href="/paulsutton/tag:codeclub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">codeclub</span></a></p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/more-trinket-coding</guid>
      <pubDate>Sat, 09 May 2020 07:36:03 +0000</pubDate>
    </item>
    <item>
      <title>Coding with Trinket and Blocks</title>
      <link>https://personaljournal.ca/paulsutton/coding-with-trinket-and-blocks</link>
      <description>&lt;![CDATA[At Paignton virtual Code Club, we are now approaching the end of the Scratch modules. Well done to everyone.  The next step is probably to progress to Python 2. &#xA;&#xA;If you don&#39;t feel ready to do lots of typing, you may want to look at Trinket and blocks.    Then perhaps move to the Code Club modules [3].&#xA;&#xA;Blocks, as the name suggests, is a block based system. The difference here is, that the blocks are all Python statements and code.  So combining these allow you to easily start coding in Python.&#xA;&#xA;To get started you need to sign up for an account on the Trinket website [1]&#xA;&#xA;trinket&#xA;&#xA;Click you user name and select new trinket and then select blocks&#xA;&#xA;select blocks&#xA;&#xA;You are now presented with your development area.&#xA;&#xA;dev area&#xA;&#xA;You may want to change your project title to something meaningful.&#xA;&#xA;change title&#xA;&#xA;You can select the category of block, then simply use click / drag in similar way as you would with Scratch.&#xA;&#xA;So in this example I am just going to draw a square.&#xA;&#xA;draw square&#xA;&#xA;As we are using turtle, you will need to change the pen up, block so that it says pen down.&#xA;&#xA;change command&#xA;&#xA;Adding comments to your code is important, as it helps you keep track of what the code is doing and helps with debugging also helps others understand your code.&#xA;&#xA;add comment&#xA;&#xA;You can also view the Python code that is produced,  this can be copy / pasted to IDE so you can just run the Python code on its own.&#xA;&#xA;![View Python]&#xA;&#xA;https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/square-python-code.png&#xA;&#xA;Finally you can share your project with others.&#xA;&#xA;share&#xA;&#xA;Hopefully this is helpful.&#xA;&#xA;Resources&#xA;&#xA;1 Trinket&#xA;2 Python&#xA;3 Code Club python Modules&#xA;&#xA;#codeclub,#paignton,#trinket,#python,#coding,#skills,#technology&#xA;&#xA;cc-by logo&#xA;&#xA;Licenced under Attribution 4.0 International (CC BY 4.0)&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>At Paignton virtual Code Club, we are now approaching the end of the Scratch modules. Well done to everyone.  The next step is probably to progress to Python [2][3].</p>

<p>If you don&#39;t feel ready to do lots of typing, you may want to look at Trinket and blocks.    Then perhaps move to the Code Club modules [3].</p>

<p>Blocks, as the name suggests, is a block based system. The difference here is, that the blocks are all Python statements and code.  So combining these allow you to easily start coding in Python.</p>

<p>To get started you need to sign up for an account on the Trinket website [1]</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/trinket1.png" alt="trinket"></p>

<p>Click you user name and select new trinket and then select blocks</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/select-blocks.png" alt="select blocks"></p>

<p>You are now presented with your development area.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/turtle-blocks.png" alt="dev area"></p>

<p>You may want to change your project title to something meaningful.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/addprojecttitle.png" alt="change title"></p>

<p>You can select the category of block, then simply use click / drag in similar way as you would with Scratch.</p>

<p>So in this example I am just going to draw a square.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/square.png" alt="draw square"></p>

<p>As we are using turtle, you will need to change the pen up, block so that it says pen down.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/change-command.png" alt="change command"></p>

<p>Adding comments to your code is important, as it helps you keep track of what the code is doing and helps with debugging also helps others understand your code.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/comments.png" alt="add comment"></p>

<p>You can also view the Python code that is produced,  this can be copy / pasted to IDE so you can just run the Python code on its own.</p>

<p>![View Python]</p>

<p><a href="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/square-python-code.png" rel="nofollow">https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/square-python-code.png</a></p>

<p>Finally you can share your project with others.</p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/share-menu.png" alt="share"></p>

<p>Hopefully this is helpful.</p>

<p><strong>Resources</strong></p>

<p>1 <a href="https://trinket.io/" rel="nofollow">Trinket</a>
2 <a href="https://www.python.org/about/gettingstarted/" rel="nofollow">Python</a>
3 <a href="https://projects.raspberrypi.org/en/codeclub/python-module-1" rel="nofollow">Code Club python Modules</a></p>

<p><a href="/paulsutton/tag:codeclub" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">codeclub</span></a>,<a href="/paulsutton/tag:paignton" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">paignton</span></a>,<a href="/paulsutton/tag:trinket" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">trinket</span></a>,<a href="/paulsutton/tag:python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">python</span></a>,<a href="/paulsutton/tag:coding" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">coding</span></a>,<a href="/paulsutton/tag:skills" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">skills</span></a>,<a href="/paulsutton/tag:technology" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">technology</span></a></p>

<p><img src="https://raw.githubusercontent.com/zleap/blogmedia/master/88x31.png" alt="cc-by logo"></p>

<p><a href="https://creativecommons.org/licenses/by/4.0/" rel="nofollow">Licenced under Attribution 4.0 International (CC BY 4.0)</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/coding-with-trinket-and-blocks</guid>
      <pubDate>Thu, 23 Apr 2020 10:36:53 +0000</pubDate>
    </item>
  </channel>
</rss>