Strings Exercises

For these exercises, we’re only going to use IRB.

Remember: To run IRB, open a command line window (Powershell or Terminal). Then enter the command irb and press Enter.

To exit a running IRB, enter the command exit.

  1. What is a String? Try to explain it to yourself or another participant in your own words.
  2. How do you recognize a String?
  3. How long is the following String? "I really think I am getting the hang of Ruby now."
  4. Turn around the following String: "I like these exercises."
  5. Does the following String include the letter “m”? "Come on, let’s all learn Ruby!"
  6. The whole String in capital letters, please! "I am learning Ruby."
  7. The whole String in small letters, please! "Let’s code RUBY!"
  8. Capitalize the following String, please! "ruby monstas for the win!"