/Udemy-phone-area-code

Build a phone area code look up program

Primary LanguageRuby

Udemy-phone-area-code

Build a phone area code look up program

  1. Create a dictionary (hash) with 10 city names, where the city name would be a string and the key, and the area code would be the value

  2. Display the city names to the user which are available in the dictionary

  3. Get input from the user on the city name (hint: use gets.chomp method)

  4. Display area code based on user's city choice

  5. Loop - keep the program running and prompt the user for new city names to lookup

  6. Method to look up area code, this will take in a hash of the dictionary and the city name and will output area code

  7. Method to display just city names