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.
This is exactly the reason I enjoy codewars katas so much. Learn something knew every day.
Oh, yes... I see...
but the return value will be retuned as an integer. it won't convert to a char. that's not what you want the function to do
blue_pulled and red_pulled are always lower than the blue_start and red_start (as per problem definition).
the concept is called a vacuous truth. the tests are correct
according to
evcxr
, which is a rust REPLlol i have the same problem like u bro
like i don't even know why best_friend("jtekeh dek wbwclw gykc", "i", "h") should return True, even the string have no "i"
The issue is your *= for x[loop5] . just do x[loop5] * 2 so it doesn't attempt to assign it to immutable x.
Same principle if you have a scaler multiple and a vector. Used a lot in 3d models and graphics.
What happens if all the red and blue have been pulled? IE: A denom of 0?
What happens here if total is 0?
This comment is hidden because it contains spoiler information about the solution
Yeah
Since the return value of the function is
char
, you can simply replacechar(i)
withi
.Thank you for the fix. Cheers!
Loading more items...