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.

ex24.rb

 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 love  8    nor comprehend passion from intuition  9    and requires an explanation 10    \n\t\twhere ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.