Search⌘ K
AI Features

Challenge: Sort and Remove Duplicates in the Collection

Explore how to define Ruby routines to collect user input, sort words, remove duplicates, and display the processed collection. This lesson helps you improve code organization and data handling by breaking down tasks into reusable functions.

Problem statement

Write a program where you do the following:

  1. Define a routine named give_a_word that prompts the user to give a ...