Exercise 24. More Practice


You are getting to the end of this section. You should have enough Ruby “under your fingers” to move on to learning about how programming really works, but you should do some more practice. This exercise is longer and all about building up stamina. The next exercise will be similar. Do them, get them exactly right, and do your checks.


 1    puts "Let's practice everything."  2    puts 'You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs.'  3  4    poem = <<END  5    \tThe lovely world  6    with logic so firmly planted  7    cannot discern \n the needs of ...

Get Learn Ruby the Hard Way: A Simple and Idiomatic Introduction to the Imaginative World of Computational Thinking with Code, Third Edition, Video Enhanced Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.