It looks astonishing to me that there are so many ways to solve a single problem. I haven't understood your example at full now, but I will eventually. I have only learned if, elsif and else and how they work. :-D
I won't be asking here what this and that is.The next things I will be searching:
book which a friend of mine has directed. This is my first ever program(except from hello world and similar programs from net)