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.
It's true, you're right. I was trying and I got confused. It was my mistake, I was not handling the input array correctly if the array was empty. Thanks.
Your own print statement is adding the extra
-
sign when you're printing to the console, that's why you're seeing double negatives.Your code also is not failing on that input, it's failing on a different one. One last thing, the input that you've listed looks like two inputs put together.
This comment is hidden because it contains spoiler information about the solution
a comment
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.
This comment is hidden because it contains spoiler information about the solution
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.
Loading more items...