$ ./guess_the_languageProgramming Languages
Programming Languages · hard · #591

Which programming language is this?

def describe(n)
  return "none" if n.nil?
  case n
  when 0..9 then "small"
  when 10..99 then "medium"
  else "large"
  end
end

Answer: Ruby

It could pass for Python at a glance, but case/when ... then with 0..9 ranges, a trailing if modifier and end are Ruby.
Play Programming Languages ▸