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.
so when count is used in a comparison, it appears as soon as the conditional fails it stops rather than counting the entire array and then comparing. I used count strictly to find the amount and my solution timed out and had to implement another way.
reminds me of a manager I had. no matter the task, always ended it with "Should be easy".
I am not sure if this test case is explained in the desription:
['EAST', 'EAST', 'NORTH', 'WEST'] should equal ['EAST', 'NORTH']
I will post exact text from the Details
*Write a function dirReduc which will take an array of strings and returns an array of strings with the needless directions removed (W<->E or S<->N side by side)
----Side BY Side is the main ingredient----
*In ["NORTH", "EAST", "WEST", "SOUTH", "WEST", "WEST"], "NORTH" and "SOUTH" are not directly opposite but they become directly opposite after the reduction of "EAST" and "WEST" so the whole path is reducible to ["WEST", "WEST"].
----Again North and South were cancelled, because East and West are Side By Side----
There are no Side By Side cancellations in ['EAST', 'EAST', 'NORTH', 'WEST'].
Please copy and paste the text from the Details that explains this test case
Buckethead mentioned, now I have to pass this kata. I wonder what anagrams we can make out of Shawn Lane, Allan Holdsworth, John McGlaughlin, Joe Pass, Wes Montgomery, Pat Metheny, and Dave Fiuczynski
After getting busted up by another kata today, this kata was eggsactly what the Dr ordered.
why post that?
These test cases don't make sense:
test.assert_equals(twice_as_old(36,7) , 22)
test.assert_equals(twice_as_old(55,30) , 5)
The first one, the son's age remains fixed for this to happen. 36-22 = 14. 14/2 = 7
The second one, the son's age moves for this to happen. 55-5 = 50. 30-5(moving suns age)= 25. 50/2 = 25
I am not able to import sympy. My solution involves:
from sympy.solvers.diophantine import diophantine
from sympy import symbols
added
added
Ok, second update through. I don't think my "random" tests are so random. The only way I found to test it was running the random values through the function again. Of course the answer will equal whatever those values are.
I am timing out with itertools.combinations.
I believe I fixed everything except for the random tests, wasn't sure how to add those. I tried going to discord for help and couldn't type anything in because it wanted me to confirm my account and said my email already exists.