Below are a few pre-written examples of Python code. These are all commented so that you can learn what is going on and modify for your requirements.
Instructions
Right click on the file you want to download and select “Save link as” from the menu system. When downloaded to your computer simply navigate to Python Blocks and click on the “Choose File” icon and select the file from your hard drive to load the example into Python Blocks.
Menu System Example using functions
This is the menu example right click on it to save – Python Blocks Menu Example.xml
A basic menu system written using functions. You can see how this was written on the Knowledge Base here – https://computerscienced.co.uk/site/knowledge-base/how-do-i-make-a-menu-system-in-python-blocks/
and here – https://computerscienced.co.uk/site/knowledge-base/how-do-i-use-functions-in-a-menu-system/