Created
January 13, 2015 16:32
-
-
Save katiebuilds/52335c69980d1d798ee6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fish_length(lower, upper) | |
return rand(upper) + lower | |
end | |
puts "What kind of fish did you catch?" | |
species = gets.chomp | |
puts "What is the biggest (in inches) that kind of fish can be?" | |
upper = gets.chomp.to_i | |
puts "How small (in inches) is the smallest fish you would keep?" | |
lower = gets.chomp.to_i | |
fish_length(lower, upper) | |
puts "Last week I caught an awesome #{species} that was #{fish_length} inches" + | |
"long!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment