basic constructions if testscolon and indentation very often in lifeand in computer programsthe next action depends on the outcome of question starting with "ifthis gives the possibility to branch into different types of action depending on some criterion let us as usual focus on specific examplewhich is the core of so-called random walk algorithms used in wide range of branches in science and engineeringincluding materials manufacturing and brain research the action is to move randomly to the north ( )east ( )south ( )or west (wwith the same probability how can we implement such an action in life and in computer programwe need to randomly draw one out of four numbers to select the direction in which to move deck of cards can be used in practice for this purpose let the four suits correspond to the four directionsclubs to ndiamonds to ehearts to sand spades to wfor instance we draw cardperform the corresponding moveand repeat the process large number of times the resulting path is typical realization of the path of diffusing molecule in computer programwe need to draw random numberand depending on the numberupdate the coordinates of the point to be moved there are many ways to draw random numbers and translate them into ( four random directionsbut the technical details usually depend on the programming language our technique here is universalwe draw random number in the interval oe and let oe : correspond to noe : : to eoe : : to sand oe : to let and (cthe author( lingeh langtangenprogramming for computations pythontexts in computational science and engineering doi --