Created
August 6, 2015 15:41
-
-
Save sos4nt/a41b36d21f6eec5e0a42 to your computer and use it in GitHub Desktop.
elsif converted to else if
This file contains 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 describe(inhabitant) | |
if inhabitant == "sophie" | |
puts 'gender: female' | |
puts 'height: 145' | |
else | |
if inhabitant == "paul" | |
puts 'gender: male' | |
puts 'height: 145' | |
else | |
if inhabitant == "dawn" | |
puts 'gender: female' | |
puts 'height: 170' | |
else | |
if inhabitant == "brian" | |
puts 'gender: male' | |
puts 'height: 180' | |
else | |
puts 'species: Trachemys scripta elegans' | |
puts 'height: 6' | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment