Ad
  • Custom User Avatar

    That's not a question, the function's name in Racket is literally palindrome?. That is a code block that should only be shown in Racket.

    the function is called however you want

    Good luck with passing the tests if you name the function however you want. Removed the code block and added a link to wikipedia about what a palindrome is, that should be enough.

  • Default User Avatar

    I agree this needs a better description. Why not make a proper pseudo-code for 8 kyu bloody beginners?

    is_palindrome("nope")    // should return False
    is_palindrome("Yay")     // should return True
    

    Also, I don't get the meaning of the question "In Racket, the function is called palindrome?". The answer is no, the function is called however you want and there are no pre-defined palindrome functions nor in Racket, Python or C++.

  • Default User Avatar

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

  • Default User Avatar

    Thank you for advise.
    Next time will do it like you said :)

  • Custom User Avatar

    To summarize:
    [start:stop;step]
    the default start value is the beginning, and the default stop value is the end.
    default step = 1.
    So, [::1] wouldn't do anything. But when you use -1, it gets reversed and counts down.

  • Custom User Avatar

    i cant resolve this problem, because i found solution.

    then mark as question.

  • Default User Avatar

    I post this ISSUE here not because i cant resolve this problem, because i found solution.

    It is strange to talk about my problems when i trying to help others.

  • Default User Avatar

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

  • Custom User Avatar

    I m a beginner in python. So it is hard to understand for me that what is happening in string[::-1].

  • Custom User Avatar

    English is not native language for a huge amount of people on CW. If your vocabulary is lacking, that's your problem.

  • Default User Avatar

    Maybe, but for not native language users(English), word palindrome, in that context look like just function name.
    That confusing.

  • Custom User Avatar

    https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range

    (you too, you need to work out your google skills, apparently ;) )

    keep in mind that language APIs are a mine of gold (when they are well written... Which is globaly the case for python), so use them. ;)

  • Custom User Avatar

    I tested it. But I have a doubt. string[ : : -1] in this indexing starts with 0 and ends with -n. It means first and last letter of a string should be same.

  • Custom User Avatar

    Nope, not an issue.

    But maybe you need a better dictionnary? (or working out your google skills a bit more?) ;)

    Cheers

  • Default User Avatar

    This Task need a better explanation/description.

  • Loading more items...