Files
wehub-resource-sync dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

2.4 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
69c5f3d787b1725d5f00c8b7 Challenge 253: Acronym Finder 29 challenge-253

--description--

Given a string representing an acronym, return the full name of the organization it belongs to from the list below:

  • "National Avocado Storage Authority"
  • "Cats Infiltration Agency"
  • "Fluffy Beanbag Inspectors"
  • "Department Of Jelly"
  • "Wild Honey Organization"
  • "Eating Pancakes Administration"

Each letter in the given acronym should match the first letter of each word in the organization it belongs to, in the same order.

--hints--

find_org("NASA") should return "National Avocado Storage Authority".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(find_org("NASA"), "National Avocado Storage Authority")`)
}})

find_org("CIA") should return "Cats Infiltration Agency".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(find_org("CIA"), "Cats Infiltration Agency")`)
}})

find_org("FBI") should return "Fluffy Beanbag Inspectors".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(find_org("FBI"), "Fluffy Beanbag Inspectors")`)
}})

find_org("DOJ") should return "Department Of Jelly".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(find_org("DOJ"), "Department Of Jelly")`)
}})

find_org("WHO") should return "Wild Honey Organization".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(find_org("WHO"), "Wild Honey Organization")`)
}})

find_org("EPA") should return "Eating Pancakes Administration".

({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(find_org("EPA"), "Eating Pancakes Administration")`)
}})

--seed--

--seed-contents--

def find_org(acronym):

    return acronym

--solutions--

def find_org(acronym):
    orgs = [
        "National Avocado Storage Authority",
        "Cats Infiltration Agency",
        "Fluffy Beanbag Inspectors",
        "Department Of Jelly",
        "Wild Honey Organization",
        "Eating Pancakes Administration",
    ]
    for org in orgs:
        initials = ''.join(word[0] for word in org.split())
        if initials.upper() == acronym.upper():
            return org
    return "not found"