Coding with Trinket and Blocks
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].
If you don'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].
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.
To get started you need to sign up for an account on the Trinket website [1]
Click you user name and select new trinket and then select blocks
You are now presented with your development area.
You may want to change your project title to something meaningful.
You can select the category of block, then simply use click / drag in similar way as you would with Scratch.
So in this example I am just going to draw a square.
As we are using turtle, you will need to change the pen up, block so that it says pen down.
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.
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.
![View Python]
https://raw.githubusercontent.com/zleap/blogmedia/master/trinket/square-python-code.png
Finally you can share your project with others.
Hopefully this is helpful.
Resources
1 Trinket 2 Python 3 Code Club python Modules
#codeclub,#paignton,#trinket,#python,#coding,#skills,#technology
Licenced under Attribution 4.0 International (CC BY 4.0)
Mastodon | Peertube | Join Mastodon |
AI statement : 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.