Retired
kinematics 1 (retired)
Loading description...
Fundamentals
Algorithms
Physics
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
python
Rounding prevents correct float comparision.
Two similar values may be rouded to different results, e.g. 0.995, 0.9950000000000001 => 0.99, 1.0
Results are wrong.
Your points change direction after collision, 2nd sample test 40° -> 37.5°; 3rd sample test: 34° -> 28.5°
a=k*9.8
is acceleration in the direction of movement, but you use it as both a_x and a_yThis is the worst kata I ever seen.
This comment has been hidden.
> PI = 3.142 > Everything is being rounded
Nothing was fixed.
okay i guess now you have nothing to be upset about,pls check it once again.
Still not fixed.
Alex, for fuck sake, when will you get the idea that he cannot fix anything he doesn't know/understand in the first place. So just explain to him what you want exactly.
Returning different data types is bad, and the expected behavior is not mentioned anywhere.
can you please elaborate on this
resolved
Do I have to reraise every issue?
i'm sorry for being such a mess but its my first and i'm gaining a lot from your issues.
You're already returning the final coordinates of the objects, why do you ask to also calculate the travelled distances too? And the result should be a tuple, not a list.
okay but what is the reason for this argument,that result should be tuple?
i asked to return distance just so that the user can know quantitatively which block went farther and by how much.
i have made the result to be a tuple insted of a list but i still don't get your point pls tell more about it.
Not fixed, and the main issue is still there.
but that is the ans and i have asked to return ans rounded to second decimal place because it can be inconvenient if the ans differs at 4th or 5th decimal place.
And that's why you have to compare the values for approximate equality instead of coming up with bad requirements?
Are you serious? Importing a constant is too hard or what's the meaning of this?
this is given to maintain uniformity in all the solutions
Nothing should be ever rounded.
resolved
Maybe i am missing something in the description, but at what time should you return the coordinates? Also where is
K
used? And it says "m1
moving with vel.u1
,..., with vel.v1
"k is the friction coefficient
For what moment in time should you calculate the coordinates? Directly when the collision is happening? A second after the collision?
Also I know k should be the friction coef. but you give no information if
m1
even starts inside or outside the frictionless square.please check i think i have answered all your querries.
Hi,
thanks,i'll do it
resolved
btw, the link you put in there is kind of a very long shot... the problem is about chocs. Not just newtonian mechanic. To me, the chosen link isn't appropriate.
pls check now,u can directly find the formulas.
na, worse than before x). Here nobody knows what are the different symbols...
can you help me improving this kata
resolved
random tests:
revised,please have a look.
why don't you generate really random values fro each arguments? (like, disconnected to each others) And you need a more wide range of random values
Because it can make processing time longer?Also the values are different so are the ans,all the border cases have been tested in basic test and they abide by the laws of physics.
pls solve the question once and let me know if the solution is doable,if we solve it as a physics problem?
bad reason. Your solution is O(1), meaning you can put any kind of random value for any argument.
For now, considering the way the tests are done, they still are easily cheatable (that I can demonstrate to you, if you want)
thing is: I didn't do this kind of stuff for like... 15 years. And I don't really like the idea of digging into that again.
Actually I'm a self taught new bee,and you look pretty experienced,pls can you guide me how can I improve my skills and aquire new ones.
easy:
for instance, this;
shoudl be somehting like:
And write on single assertion, in a loop of 100 tests
EDIT: btw, plz use the new test framework
thanks a lot!
Can you please also show that how can random tests be cheated,like you said earlier.
with the last update, they cannot anymore (hence my insistance about it)
okay thanks,i have updated the description,now i hope its better than before.