Ad
  • Default User Avatar

    You can look at the tests by printing the input:

    Troubleshooting - print the input

    For this kata, therefore, if you type:

    print(title, minor_words)

    in your function, you'll be able to read in console which inputs you are failing on.

    As for tests 6 and 9 here, just to get you started: you will find that test#6 is using ab as input title and ab as input minor_words; it is expecting Ab as output not ab - Why? Because if you re-read the kata description:

    "(b) considered to be an exception and put entirely into lower case unless it is the first word, which is always capitalised."

    so you should always capitalise the first word, regardless of whether it appears in the "exception" words or not.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Not a kata issue, your code mutates the input list, as the error's message says. Read this too: https://docs.codewars.com/training/troubleshooting/#post-discourse

  • Custom User Avatar

    Not a kata issue. Please read this: https://docs.codewars.com/training/troubleshooting

  • Custom User Avatar

    Please mark comments containing solution code as a spoiler.

    The source of your problem is given in the error message: ImportError: cannot import name 'adjacent_element_product' from 'solution'. Your function does not have the correct name, so the tests can't find it. Do not rename functions or classes you encounter in the trainer.

  • Default User Avatar

    Your function needs to return the generated string, you're printing it to the console!