Ergodic theory is hard to study because it is based on measure theory, which is a technically difficult subject to master for ordinary students, especially for physics majors. Many of the examples are introduced from a different perspective than in other books and theoretical ideas can be gradually absorbed while doing computer experiments. Theoretically less prepared students can appreciate the deep theorems by doing various simulations. The computer experiments are simple but they have close ties with theoretical implications. Even the researchers in the field can benefit by checking their conjectures, which might have been regarded as unrealistic to be programmed easily, against numerical output using some of the ideas in the book. One last remark: The last chapter explains the relation between entropy and data compression, which belongs to information theory and not to ergodic theory. It will help students to gain an understanding of the digital technology that has shaped the modern information society.