Skip to content

paircolumbus/LetsDrill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

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