All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General > Word Problems
Airport Codes (Posted on 2023-11-30) Difficulty: 3 of 5
You will be given a list of 9 words and your job is to search each word and find the airport codes hidden in each word. For some airport codes, a business name or person may be used in place of a word when one does not exist. For example, Concord corresponds to ORD, or Chicago O'Hare international Airport.
Relax
Mlive News Michigan
Diarrhea
Atlas
Tulsi Gabbard
Mspy
Sforzando
Santa
Algae

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution including international codes | Comment 2 of 4 |
What immediately stand out are LAX (Los Angeles International) in "relax", SFO (San Francisco) in "sforzando", and LGA (La Guardia) in "algae".

For the rest:

words=["relax","mlivenewsmichigan","diarrhea","atlas", ...
  "tulsigabbard","mspy","sforzando","santa","algae"];
for i=1:length(words)
  word=words(i)
  fid=fopen("c:\VB5 Projects\flooble\airport codes.txt","r");
  while ~feof(fid)
    l=fgetl(fid);
    idx=strfind(l,'(');
    if ~isempty(idx)
      code=lower(l(idx+1:idx+3));
      idx=strfind(word,code);
      if ~isempty(idx)
        disp(l)
      end
    end
  end
  close('all')
  disp(' ')
end

finding

word = 
    "relax"
Los Angeles, CA (LAX)
Trelew, CB, Argentina (REL)
 
word = 
    "mlivenewsmichigan"
Chicago, IL - All airports (CHI)
Moline, IL (MLI)
Ende, Indonesia (ENE)
Gan Island, Maldives (GAN)
Inagua, Bahamas (IGA)
Samos, Greece (SMI)
 
word = 
    "diarrhea"
Alto Rio Senguerr, Argentina (ARR)
Yaroslavl, Russia (IAR)
 
word = 
    "atlas"
Atlanta, GA (ATL)
Las Vegas, NV (LAS)
 
word = 
    "tulsigabbard"
Tulsa, OK (TUL)
Alor Island, Indonesia (ARD)
Balmaceda, Chile (BBA)
Inagua, Bahamas (IGA)
Shetland Islands, United Kingdom - Sumburgh (LSI)
 
word = 
    "mspy"
Minneapolis, MN (MSP)
 
word = 
    "sforzando"
San Francisco, CA (SFO)
Fortaleza, Brazil (FOR)
 
word = 
    "santa"
San Diego, CA (SAN)
 
word = 
    "algae"
New York, NY - La Guardia (LGA)
Algiers, Algeria (ALG)

  Posted by Charlie on 2023-11-30 10:35:46
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information