Ad
  • Custom User Avatar
  • Custom User Avatar

    kata was retired

  • Custom User Avatar

    There should be a test case with an empty array.

  • Custom User Avatar

    you must create a pie chart relative to the list as a new list, adding up to 360

    No, the expected result often adds up to 359 or 361.

    should be rounded to the nearest integer

    The description should specify how to round half integers (up, down, ...).

  • Custom User Avatar

    pass random list in your solution before giving it to the user, just replace

    test.assert_equals(create_pie_chart(rand_list), chartify(rand_list))
    

    with

    sol = chartify(rand_list)
    test.assert_equals(create_pie_chart(rand_list), sol)
    
  • Custom User Avatar

    The total of the resulting list doesn't really adds up to 360, just close to it.

  • Custom User Avatar

    The fact I have no idea what's happening in your solution tells me it might just be easier to do it the normal way, but how can I get around this?

  • Custom User Avatar

    Python: Random tests are vulnerable to input modification. See this

  • Custom User Avatar

    I have no idea I fucked this up badly lol

  • Custom User Avatar

    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 and b combined form a right angle".

  • Custom User Avatar

    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

  • Custom User Avatar

    Random tests are incorrect:

    check_angle('3.5 pi', 0)
    'perpendicular' should equal None
    
  • Custom User Avatar

    I agree with dfhwze's comments below.

    Here are my suggestions:

    • In your Description, you need to define what it means for two "angles" to be perpendicular or parallel. I mistakenly assumed that you wanted us to anchor one of the lines (or rays) from each of the angles with the vertex at the origin (x=0, y=0) and along the x-axis. I then assumed that you wanted us to determine whether the angle formed by the second lines (or rays) were either parallel or perpendicular with each other. Based on the kata results however, a difference of 270 degrees is not considered to be "perpendicular angle".
    • In the "Task" section of your Description you state: "You must determine whether the two angles or parallel or perpendicular". The first "or" should be "are"
    • In the "Good to Know" section of your Description you state: "180 degrees = 2pi". This should be changed to either "360 degrees = 2pi" or "180 degrees = pi".
  • Custom User Avatar

    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!

  • Custom User Avatar

    Fix some issues:

    • typo: whether the two angles or parallel or perpendicular
    • you don't explain which angles are considered perpendicular (90 vs 270 degrees)
    • conflicting info: 90 degrees = 0.5pi vs 180 degrees = 2pi
    • insufficient info when to return a result other than the ones you describe
  • Loading more items...