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!
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"
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"