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.
Using CultureInfo.CurrentCulture.TextInfo.ToTitleCase is a good attempt to simplify capitalization, but it won’t fully work for Jaden Case in this context. ToTitleCase capitalizes the first letter of each word but does not affect subsequent letters. For example, ToTitleCase("hELLO wORLD") would result in "HELLO WORLD", which isn’t what Jaden Case requires. Jaden Case should only capitalize the first letter of each word and keep the rest in lowercase.
To fix this, you can convert the phrase to lowercase first, ensuring only the first letter of each word is capitalized:
CultureInfo.CurrentCulture.TextInfo.ToTitleCase(phrase.ToLower());
i think it is, bro
As the instructions said that name is a property of the object 'Players', Also we can't target the name of the player unless we use the Key Value which is the name: the structure is like that :
Players[{name: "a"}, {name: "b"} ... {name: "z}];
This comment is hidden because it contains spoiler information about the solution
Нужно добавить проверку на то что если input не array в самом начале, тогда если функция получает не массив то возвращает пустой массив.
И дальше если нет еще, условия на 0, если элемент массива равен 0. В целом загвоздка для меня была только в первом условии, что было не прописано, что делать если функция получает не массив.
/////
It is necessary to add a check about what if input is not an array at the very beginning, then if the function does not receive an array, it returns an empty array. And then, a condition for 0, if the array element is 0 what you want function to do.
In general, the only snag for me was in the first condition, what to do if the function does not receive an array.
Не заданы условия, что должен возвращать код, при получении на вход нулевого массива.
Итог на Java, не проходит 2 теста из 5, при проверке на нулевой массив и возрате такого же, не проходит 1 тест. И как годать?
Mr.Obvious :D
This comment is hidden because it contains spoiler information about the solution
I think it's more 7kyu than 8
Learning how to handle a null input and different outputs are both very useful, good exercise. More of a 7th level though.
Same I also did this but with string since it's the return type and it wouldn't work so I wrote an if statement with the replace method inside instead.
how do we see the test case for the "Testing for wrong test 1"?
the 0 aren't count for the positive
love the simplicity
Loading more items...