The purpose of this post is to demonstrate how Python trinkets can be used to code with blocks.
Trinket blocks use the same approach as Scratch: A collection of blocks that the programmer can select to build their code in a more visual way.
The benefit of Trinket Blocks is that you can then view the Python code that it has generated.
A fantastic resource for those who are struggling with the syntax.
Also a great transition for those who have learned to program using Scratch and want to switch to text based programming e.g. using Python.
Look at this example that recreate the Magic 8 Ball program. Click on view code “>_” button to switch between the “Blocks code” and the Python code.