add all chapter 01's ruby version code based on python's