Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 223 Bytes

8 kyu - Convert boolean values to strings 'Yes' or 'No'..md

File metadata and controls

13 lines (12 loc) · 223 Bytes

Task

Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false.

Solution

def bool_to_word bool
  if bool
    return "Yes"
  else
    return "No"
 end
end