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.
Really. I'm sorry, my decision was different. So far I can't figure out why the above solution works.
When I run the code with XO("zpzpzpp") it returns true
Doesn't work with condition: XO("zpzpzpp") => true // when no 'x' and 'o' is present should return true
log statements in JS should be removed, with corresponding
chai
andassertion
frameworks importedPython new test framework should be used
fixed
The point is too far away from the vector (over 0.001 distance).
While your statement is correct in practical situations, the task indicates that "All values will be positive integers or floats, or zero.", so this solution is enough to deal with the task.
Maybe the task could tell us what to do if the number input was <=0, but this is enough for the moment.
And I thought I was stepping my game up. This is great!
Is it okay to modify the string passed in?
PEP 8 (the official style guide) literally advises against using lambda expressions.
if n == -1 return True
Starting today. I have learned a lot. If I write a letters, this code accepts letters and use numbers as a string, I wonder how to force user to only use numbers.
I'm a little bit scared of the production code of the 130+ people that voted this as being Best Practice...
Usually
Output
paragraph has been written for the common case and for all possible testcases — in this kata, the paragraph is correct only forn = 3
, while for others it's not.Loading more items...