5 kyu

No Return #2: Test the Devices

Description
Loading description...
Arrays
Fundamentals
  • Please sign in or sign up to leave a comment.
  • dfhwze Avatar

    Is this all the specs we get for type?

    type: 'M-11-8/20', // type of the device, a string
    
    • how do we parse a device?
    • how do we parse test points?
    • how do we know what is good and what is bad?
    • dfhwze Avatar

      WTF: how on Earth is value 3 on position 1 outside of range 2.01 - 1.5 and 2.01 + 1.5 ??????

      references ->
      type: 'YNAOZ-54',
          voltages: [ 10.75, 2.01, 1.98, 5.52, 9.67, 8.67, 9.76 ],
          ranges: [ 1.5, 1.5, 3, 0.5, 0.1, 0.3, 0.5 ]
          
      test case ->
      {
       ...
      },
      {
          type: 'YNAOZ-54',
          voltages: [10.75,3,1.98,4,9.67,8.67,9.76]
        }
      
      expected ->
      positions: 1[1,3]
      
    • BachMcCann Avatar

      I encountered the exact same problem. After re-reading the Description however, I discovered that the range value represents the tolerance for each testpoint in %. My original solution didn't treat the range values as percentages but as absolute values. BTW: You have to scroll the description all the way over to the right to see it (due to the length of the "javascript const references" example to find this detail).

    • dfhwze Avatar

      thank you very much, I did need to scroll all the way to the right for crucial information :)

      Issue marked resolved by dfhwze 2 years ago
  • Voile Avatar

    Ugly code compilation :P

  • smile67 Avatar

    Don't know if a ranking of 5kyu is too high (maybe 6 is enough:-)?), but there are some things you have to think about included the arrays/objects you have to deal with;-)... So generally a good kata:-)...