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.
Not exactly the same input value. Not a kata issue. Please read the posts below before creating an issue.
the test '1.2.3.4' is in both the invalid cases section, expecting False and the valid cases section, expecting True
This comment is hidden because it contains spoiler information about the solution
ty for the advice
ive fixed the None test, its ready to go with the next update
i will implement the other changes
fixed, ty :)
fixed, ty :)
Never round float results, use
test.approx_equals
. https://docs.codewars.com/authoring/recipes/floating-point-1
is a valid result and should not be used as an error indicator. In case of error the function should raise an exception (better), or return a standard "no result" value such asNone
.calling
acceleration_calc(None)
doesn't make sense; if there aren't args the correct call isacceleration_calc()
.s, u, v, t
are all supposed to be named arguments, so there should be no positional arguments; but the fixed tests are callingacceleration_calc(None)
which contains 1 positional argument. Technically speaking this is a wrong usage of the function, and a proper design would even throw an error in this case.good point! Ill add the error cases
I have resolved a bracket error, this may have fixed any issue you were having
you are right! I had a bracket in the wrong place, it should be fixed. TY :)
It is correct according to my testing, are you having an issue?
Apparently the author did the algebra wrong and
2*s
became2/s
.Ah, you're right. Time cannot be negative. Didn't think about that.
I suspect you have an issue in your implementation. I fail on pretty much all of the tests when
u, v, and s
are given.For example:
['u = 44.51', 's = -43.04', 'v = -0.54']: 23.0 should equal 42627.9
['u = -78.96', 's = -92.78', 'v = 32.86']: 27.8 should equal 239135.9
['s = -12.25', 'u = 1.27', 'v = -74.52']: -226.6 should equal -34003.7
Loading more items...