After shaking the micro:bit, it generates a random number (0 to 31), which will be shown with the led matrix (0 to 5 dots, 5 bits).
Block based programming language MicroBlocks is performant enough to complete a task normally only possible in C-family of languages.