1. Classes for the microbit
Practical examples of using classes in coding on the microbit are found in pages with Class in their name.
1.1. Classes
Almost everything in Python is an object, with its own properties and methods.
A Class is a “blueprint” for creating (instantiating) objects.
The __init__() function assigns values to object properties when the object is created.
The Objects created by calling classes can also contain methods. Methods in objects are functions that belong to the object. These functions use the self parameter to reference the current instance of the class, and to access variables that belong to the class.