Skip to content

kcrow372-appdev/string-chapter

 
 

Repository files navigation

Ruby Practice

Run your Ruby file by typing ruby and then the name of the file you want to run in the Terminal.

If we want to run string_multiplication.rb, we can write the command:

ruby string_multiplication.rb

To re-run this command, you can use the UP and DOWN arrow keys to look at the history of commands you've run in a Terminal.

String

string_multiplication.rb

Should output:

"HoHoHo"

using String multiplication.

(Don't just print the String literal "HoHoHo")

string_case.rb

Should output:

"HELLO friends AnD FaMiLy"

using a combination of the upcase, downcase, and swapcase methods.

string_chomp.rb

Shoud output:

"Hello!"

using the given starting variable.

string_gsub.rb

Should output:

"put spaces in between these words"

using the given starting variable.

string_strip.rb

Should output exactly

"no external whitespace"

using the given starting variable.

string_gets.rb

Write a program that gets a name (e.g. "alice") from the user, capitalizes it, and then says "Hello, Alice!"

Should work similarly to the following:

"What's your name?"
jelani
"Hello, Jelani!"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Ruby 98.2%
  • Shell 1.8%