Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Strings are easy to understand and almost always the same in all programing languages.
It also helps teach people how to split a string and convert it to the correct type.
To be fair, I made this kata so long ago that I don't remember the exact reasons, but it has definitely been good for the above mentioned reasons.
Nice kata to solve but why does the input have to be a string? Is there a specific reason?
Верните, в таком случае просто ноль.
It is just a variable name, it doesn't matter what it is called. If it helps you read it, you can do a rename of it when you are reading it.
Avoid names like "nn", it's not clear.
Because your code is wrong. Read the description of the Kata again.
Can you please explain in more detail what you're asking?
why they return the answer wrong?????
@mmangiamusardo please mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
F-strings:
For most cases, f-strings are the best choice. They're concise, readable, and performant.
.format() method:
If you need to support older Python versions or want more complex formatting options, use .format().
Old-style % formatting:
Avoid this method for new code, but be able to recognize it in legacy code.
Skill issue?
But yes, this would be a lot easier if the method/function took an
int
array as input. But then this kata would be even easier and not as fun.This comment is hidden because it contains spoiler information about the solution
No, I mean you are using the
max
andmin
functions on a list of strings. The way you sort a list of strings is different form how you sort a list of numbers.See: https://www.codewars.com/kata/554b4ac871d6813a03000035/discuss#60cb692f9c75d0003d7b9a79
This is python.
Yes, the instruction asked to return a string of numbers separated by a single space
Even after moving the logic out of the loop, it still gives same test error
Loading more items...