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.
I learned quite a few ways for manipulating execution time from this kata and it's solutions, so I disagree with you here.
Given the variance in solutions I don't think it's that/completely pointless.
People who don't know or recognize that a sleep can be used can learn about that. It's certainly different to a busy-wait.
And the solutions are certainly varied, which can be interesting to look through - but is/should maybe not the goal of a kata.
The form "dice" is plural. The singular form is "die." So you don't roll a dice, you roll a die. (Admittedly, even a lot of native English speakers don't know this!)
The description needs to be reworded. Angles can not be perpendicular or parallel to each other, this is not how geometry works. Angle planes can be perpendicular or parallel to each other, but that's a whole different problem in three dimensions.
I suppose you mean something along the lines of "Angles
a
andb
combined form a right angle".im pretty sure that you cant really determine if the lines are perpindicular or parallel by only knowing the angles. (i might be wrong)
the description seems to have incorrect info as it states 2 PI radians is equal to 180 degrees which is incorrect. 2 PI radians is 360 degrees. The test cases might accidentally follow this incorrect rule which might result in improper test cases
Random tests are incorrect:
I agree with dfhwze's comments below.
Here are my suggestions:
I "solved" this kata in its current state, but the description should clarify what is a parallel angle and what is a perpendicular angle (or at least link to a website that gives these definitions). I basically relied on my knowledge of parallel lines and perpendicular lines and hoped this knowledge would apply to angles, too.
Also: The description says that one of the angles will be specified in radians, but it's not really specified in radians, but in terms of pi. So in effect you have to convert from that to radians, then from radians to degrees.
By looking at the results of the random tests, I was able to identify specific situations in which the kata expected None to be returned, but I have no idea why!
Brilliant, really liked this one, made me learn a new math formula!)
I don't think this solution should pass: https://www.codewars.com/kata/reviews/65cbc64fbc97274bd7d585de/groups/65ce8cd3e70dec00013cbfc0
Ok, I added "from solution import pick_em_up". I did not realize that is how it worked. Yes, I didn't like the nested if either. I did know the percents were not perfect and thought about doing the math for it but as you said, they are rather arbitrary and I needed some random statements that worked.
Thanks again for all your help.
Ah, sorry, I was describing that in a weird way -
codewars adds
from solution import *
if you don't import the solution yourself, which should befrom solution import pick_em_up
I DON'T like how you wrote those probabilities because.. the chances there are:
on the other hand it's simple so I can't really argue with it. the numbers are arbitrary anyway. the nested if-statements is what really bothered me. I don't need to like it. that's fine.
I'm sorry, I don't see where import * is.
I added your fresh package, thank you for that.
I also updated the random code to do and explain the percentanges better.
Am I on the right track?
you should not import
*
because the solver may define things with names that you then end up using but thinking it's something else. only import the solution itself so that you're in control of your namespace :xLoading more items...