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

Home > General > Word Problems
Taramasalata inspired world (Posted on 2019-04-01) Difficulty: 3 of 5
Let's compile a ist of all geographic/geopolitical entities whose names contain at least 3 letters A and no other vowels.

Include states (like Alabama), rivers (Angara), mountains (Ararat), cities (Larnaca) etc.

Your entries must appear in reliable dictionary/atlas/database.

No Solution Yet Submitted by Ady TZIDON    
Rating: 4.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
mountains | Comment 9 of 20 |
This time I chose to parse Wikipedia's editing markup version of its table:

 Open "mountain markup.txt" For Input As #1
 Do
    Line Input #1, l$
    If Left(l, 2) = "|-" Then
      Input #1, l$: ' Text1.Text = Text1.Text & l & crlf
      
      Input #1, l$: l = LTrim(RTrim(l))
      i = 1
      While i <= Len(l)
        c$ = Mid(l, i, 1)
        If c = "[" Or c = "]" Then
          l = Left(l, i - 1) + Mid(l, i + 1)
        ElseIf c = "|" Then
          Mid(l, i, 1) = "/"
        Else
          i = i + 1
        End If
      Wend
      Do
        ix = InStr(l, "<br>")
        If ix > 0 Then l = Left(l, ix - 1) + Mid(l, ix + 4)
      Loop Until ix = 0
      
      good = 0
      l2$ = Mid(l, 2)
      
      If InStr(l, "Nangpai") > 0 Then
        xx = xx
      End If
      
      Do
        ix = InStr(l2, "/")
        If ix = 0 Then ix = Len(l2) + 1
        n$ = LTrim(RTrim(Left(l2, ix - 1)))
        l2 = Mid(l2, ix + 1)
        subgood = 1
        For i = 1 To Len(n)
          If InStr("EIOUeiou", Mid(n, i, 1)) > 0 Then subgood = 0: Exit For
        Next
        If subgood = 1 Then good = 1: Exit Do
      Loop Until l2 = ""
      
      If Left(l, 1) = "!" Then good = 0
      If good Then Text1.Text = Text1.Text & l & crlf
    End If
 Loop Until EOF(1)
 Close 1
 
The raw output was:

/Mount Everest /Sagarmatha /Chomolungma
/K2 / Chhogori / Godwin Austen Peak/Godwin Austen
/Nanga Parbat
/Gasherbrum I / Hidden Peak / K5
/Gasherbrum II / K4
/Gasherbrum III / K3a
/Gasherbrum IV / K3
/Masherbrum / K1
/Namcha Barwa
/Saltoro Kangri / K10
/Saser Kangri I / K22
/Jengish Chokusu / Tömür / Pk Pobeda
/K12 (mountain)/K12
/Yangra / <br / >Ganesh I
/Saraghrar
/Chamlang
/K6 (mountain)/K6 / Baltistan Peak
/Kangpenqing / <br / >Gang Benchhen

Clearly there were a couple of bad markups, as well as vowels with diereses not being recognized as vowels other than A. Also some are included for having a Kn name, the most famous being K2.

Mount Everest is included for its local name of Sagarmatha.

A cleaned up list (note Yangra is still here; its bad markup is a red herring):

/Mount Everest /Sagarmatha /Chomolungma
/K2 / Chhogori / Godwin Austen Peak/Godwin Austen
/Nanga Parbat
/Gasherbrum I / Hidden Peak / K5
/Gasherbrum II / K4
/Gasherbrum III / K3a
/Gasherbrum IV / K3
/Masherbrum / K1
/Namcha Barwa
/Saltoro Kangri / K10
/Saser Kangri I / K22
/K12 (mountain)/K12
/Yangra / Ganesh I
/Saraghrar
/Chamlang
/K6 (mountain)/K6 / Baltistan Peak


  Posted by Charlie on 2019-04-18 14:00:35
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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