7 kyu

Find the vowels

373 of 18,937willjharmer
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • bemaldvanitha Avatar

    Why y is considered as vowel ???

  • KUN7DM Avatar

    why is 'y' a vowel....

  • EndyPlus Avatar

    Why Y is vowel?

  • ejini战神 Avatar

    No random tests in Haskell

  • RGeex Avatar

    Wrong description!

    • According to the condition: it is necessary to find the indices of the letters (the index starts from 0)
    • In fact: the order of letters in a word.
  • leah_is_not_available Avatar

    This comment has been hidden.

  • bunnyhoops123 Avatar

    just Y ? :((

  • enriquemoyamx Avatar

    I think the Kata owner should give a hint that the letter "Y" is also considered a vowel...

  • tefs Avatar

    It's the second consecutive day that in every kata realized, there is always a random test messing around with all the test business logic(even without any documentation). These need to disapper, or create documentation for these random tests. PS: and I didn't talked about the "y vowel error"(which off course, it's a consoant) ERROR ALERT =RED FLAG

  • Jaarabytes Avatar

    funny kata, since when was "y" a vowel :(

  • arif-umer78 Avatar

    Y is a vowel? :(

  • l96alex Avatar

    I shall join the horde here and complain that Y IS NOT A VOWEL AND INDEX != POSITION anyway nice one have a good day

  • alexfrompalmsprings Avatar

    I was helping one of my boys with this question (job interview prep). It took me 30 minutes to figure out why he was failing...

    'Y' is not vowel!!!

  • lowkey1001100 Avatar

    Perhaps you should state up front, "We want to know the 'ordinal position' of the vowels in a given word" rather than its "index position." Because asking for the "index position," and not expecting the index position is just poor wording for instructions...

  • timothygribbin Avatar

    Some explanation of *nb_vowels? its passed to the function with no explanation of what it is.

  • fozilbek_kholboev Avatar

    Y is vowel!?

  • MorganGarciaBrown Avatar

    why not just start at index 0. WHY

  • rowcased Avatar

    Sample Tests for all languages should contain at least one instance of a word where Y is used as a vowel. Or for overkill, use a sentence like: "Why cry, shy gypsy nymph spy?" or maybe "Dry fry my wry myrrh cysts."

  • trashy_incel Avatar

    C translation (author gone)

  • akar-0 Avatar

    COBOL translation (author inactive).

  • user1430804 Avatar

    Good challenge but 'y' is not a vowel !

  • JoshuaSimonBloom Avatar

    Y is NOT a vowel...?

  • adish123 Avatar

    This comment has been hidden.

  • kanuos Avatar

    Y is not a vowel! At least, not in English

  • dummyaccount Avatar

    Yup. Since when, in what world was 'Y' a vowel? lol

  • andreapt82 Avatar

    "y" is not a vowel, at least in portuguese is not

  • roshan-ican Avatar

    i know something is wrong with my solution but just i couldn't it, it is like the uppercase test is not passing that's all

  • Shane-Xue Avatar

    The kata considers 'y' as a vowel, but this is neither explicitly stated in the kata description nor presented in the tests testable by the user. The author could 1.add the assumtion in the kata description and 2.add some sample tests that would not pass if y is not considered.

  • IntuCode Avatar

    Nice "read all of the description" kata

  • toyboks Avatar

    finally kata considering 'y' a vowel

  • iming Avatar

    PHP translation, ready to be evaluated

  • packetique Avatar

    Passed: 4 Failed: 0

    but I got:

    Traceback (most recent call last): File "main.py", line 2, in import codewars_test as test ModuleNotFoundError: No module named 'codewars_test'

  • MikChan Avatar

    C++ fork

    • Added random tests.
    • Fixed this issue.
    • Switched to C++17.
    • A little organized headers, consts and indentations.
  • FArekkusu Avatar

    C++ tests generate warnings.

  • COder_ Avatar

    failed on the word 'bialy': [2, 3] should equal [2, 3, 5]...............how is this possible...y is not vowel

  • WestwardLand968 Avatar

    Python - Needs random tests

  • Hakeemmidan Avatar

    I suggest changing the index to start from 0 instead of 1. I didn't catch the note and it threw me off a bit. Just a suggestion =)

  • ThatOneGuy2029 Avatar

    As 'Y' is only rarely considered a vowel, it really shouldn't be included. Easy enough to work around, but just a failure in the conceptualization of this kata. Just because you put y as a vowel in the instructions doesn't subvert the rules of language, so please stop using that excuse and just fix your kata.

  • JoshuaESab Avatar

    This comment has been hidden.

  • cs_student_75 Avatar

    I keep getting this error "EOFError: EOF when reading a line" in the window BUT when I run code in terminal or notebooks it works fine. Testing "super" gives [2, 4] as the expected result along with the other sample tests. The vowels "aeiouy" were considered and instructions were read.

  • ravjsdev Avatar

    A E I O U Y? i didnt even read the instructions when completing the task as I know english language vowels are A E I O U - please correct this as otherwise this kata is incorrrect - it made me lol though when i finally read the instructions and realised why my tests were failing :-)

  • darKdechi Avatar

    Consider case should be in the description.

  • rrogerthat Avatar

    How do we fix the problem when there are 2 of the same vowels, and so .indexOf would always return the index of the first vowel it finds even though we returned that one already. Example: [a, a] would be [1, 1] but we want [1, 2]

  • anywhereiromy Avatar

    The letter y is not a vowel in the English language. There are ony five vowels, a, e, i, o and u.

  • wz_unknown Avatar

    [1,3,6] why??????

  • GiacomoSorbi Avatar

    Crystal translation still waiting :)

  • GiacomoSorbi Avatar

    JS and Crystal translation kumited :)

  • marilynmags Avatar

    This kata doesn't make sense. The instructions say:

    '''We want to know the index of the vowels in a given word, for example, there are two vowels in the word super (the second and fourth letters).

    So given a string "super", we should return a list of [2, 4]. '''

    index numbers begin at 0 in lists, the vowels in 'super' would be at 1 and 3

    If we want to know the order in the list as opposed to index number the instructions on the kata should be amended to reflect this.

  • solomonhume Avatar

    "Y" is sometimes a vowel (e.g. in "smelly") sometimes not (e.g. in "yes"). It is wrong to simply treat it as a vowel.

  • schulsstein Avatar

    This comment has been hidden.

  • Sherry Pan Avatar

    def vowel_indices(word): s = word.lower() return vowel = [ i+1 for i in range(len(s)) if s[i] in 'aeiouy']

    Could someone tell me why this version got me syntax error while the enumerate method works?Thanks.

  • user5036852 Avatar

    Would someone translate this kata to C# or JS?

  • RobAWilkinson Avatar

    Tests all pass everywhere, but somethings going on with the clojure tests across codewars, they never count as passed

  • mbird Avatar

    It should be made clear in the description what letters are supposed to count as vowles.

  • Caspar Fischer-Zernin Avatar

    Should be clear that "y" is also a vowel, its not in most other languages.

  • user9762772 Avatar

    Vowels should be indicated clearly.

  • mble Avatar

    Nice kata. It might be a good idea to include the list of acceptable vowels in the kata description, as other languages have different vowels (Welsh has 'w', Serbo-Croatian has 'r' etc).

  • gggina Avatar

    This comment has been hidden.

  • Forec Avatar

    I don't know whether y belongs to vowels... If it does, just ignore my offence...

  • boredomPill Avatar

    Y in a vowel, please see to it being identified as such. Other than that? nothing wrong with this

  • JackSchpeck Avatar

    In my opinion (backed by Wikipedia https://en.wikipedia.org/wiki/Vowel#Written_vowels) there are 6 vowels in latin alphabet. Namely: a, e, i, o, u, y.

    In Haskell test fixture there are some test cases containing the letter y ("bialy"), but the assert says the vowel indexes are [2,3], whereas they should in fact be [2,3,5]. In other words letters 'y' and 'Y' should be considered vowels by the test fixtures, but they are not. But it might be some linguistic confusion from my side :-)

  • g964 Avatar

    Add some random cases and I could approve your kata:-)

  • ChristianECooper Avatar

    Neat little kata, but has major problem in the Python unit tests, as they do not compile!

    Third line of the given Python unit test shoud read:

    Test.assert_equals(vowel_indices("super"), [2,4])
    

    Rather than:

    Test.assert_equals(vowelIndices("super"), [2,4])
    
  • Unnamed Avatar

    The initial solution in Clojure contains (ns vowelIndices) while the tests expect (ns vowelIndices.core). Namespaces and functions are usually named-like-this (vovel-indices.core).

  • Unnamed Avatar

    Python: Test.describe("dbl_linear") RLY?

  • Beast Avatar

    This comment has been hidden.

  • raulbc777 Avatar

    A good kata but needs mores tests: extreme cases, challenging and random tests.