Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Let's Drill!

Just to test our knowledge of Ruby, let's solve a few puzzles.

A few of my assumptions:

  • You've been able to get Ruby up and running on your computer
  • You know how to run a Ruby script from the command line

If any of the above is untrue, please let me know.

Enjoy!

Exercises

Calculate a grade

Create a method get_letter_grade that accepts a classroom grade and returns the letter grade as a String. It should return only 'A', 'B', 'C','D', or 'F'.

get_letter_grade(90) => returns "A"

get_letter_grade(74) => returns "C"

Find the shortest string in an array

Create a function shortest_string that accepts an array of strings and returns the shortest.

shortest_string(['apple', 'car', 'yo']) => returns "yo"

shortest_string(['fargo', 'columbus', 'Indianapolis']) => returns "fargo"

About

Fun, little drills to review our knowledge of Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages