I need to get the user to input five words, which I believe I have. Then the program needs to spit the words in alphabetical order with every other word being in all-caps, s
Just out of curiosity:
arr = %w(orange apple lemon melon lime) a1, a2 = arr.sort.partition.with_index { |_, i| i.even? } a1.map(&:downcase).zip(a2.map &:upcase).flatten.compact