7 kyu

Is n divisible by (...)?

3,262 of 7,937IVBakker
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • tobeannouncd Avatar

    The description should probably state that the divisors are non-zero.

  • AlexeyKozlov7891 Avatar

    What to do if a variable is not specified in a function?

  • saudiGuy Avatar

    python new test framework is required. updated in this fork

  • KayleighWasTaken Avatar
  • KEVINPRACTICEYUAN Avatar

    In java:

    Why does it give me errors right before I even type anything?

    It says,

    "illegal start of type public static boolean isDivisible(...) { ^" Not to mention that this was how the code was when I started this kata.

    I'm not sure if that's a problem or something.

  • hrafov Avatar

    This comment has been hidden.

  • erlendv Avatar

    i see we have different amount of arguments in the parameter, does that mean that the parameter is an array?

  • AkumaYin0908 Avatar

    How would I know what arguments were use in a method thru stack trace only? I'm having a hardtime about the stacktrace: expected but . Like how will I be able to debug this if all the arguments given returns the right result

  • LosBlobbos Avatar
  • Ibrahimf9 Avatar

    the python version dosent have an argument for the function

  • ParanoidUser Avatar

    A little typo in the description: "... checks if the first a[gr]ument n is divisible".

  • PowerSlaveAlfons Avatar

    Just returning true passes all the tests in C#, please fix.

  • jkulton Avatar

    Although the code should still pass in most cases, line 1 of the description example code block has an extra and unnecessary trailing comma:

    isDivisible(6,1,3,)--> true because 6 is divisible by 1 and 3

  • kittyj27 Avatar

    Don't have to change anything in C# for all tests to pass.

  • JoshuaBones Avatar

    Whoops I shouldn't have submitted it. Did nothing.

  • samjlb Avatar

    I did absolutely nothing on the C# version and all tests passed. I did the attempt and all tests passed. I did not submit it obviously.

  • ALYIP Avatar

    This comment has been hidden.

  • VitalyMaly Avatar

    This comment has been hidden.

  • dinglemouse Avatar

    The Java initial code both wrong syntax and wrong type for the given test data:

    • Wrong Syntax, wrong type: public static boolean isDivisible(Double numbers...){

    • Right Syntax, wrong type: public static boolean isDivisible(Double... numbers){

    • Right: public static boolean isDivisible(int... numbers) {

  • aoben3 Avatar

    How can you pass in arguments in the test cases but create a defaut function def is_visible() with no arguments? (Using python) _Are we supposed to be passing in a list?

  • ysurilov Avatar

    This comment has been hidden.

  • computerguy103 Avatar

    This would make a good intro to JS arrow functions... they make the code really simple...

  • declone Avatar

    hmm in the test case...
    what's the point of *args[:] ?
    Isn't that the same as *args ?

  • MurKit Avatar

    Shall the first argument be divible on sum of rest or on every each argument?

  • pre Avatar

    Typo -- agurment :)

  • noiseyCoder Avatar

    By "all other numbers", do you mean the sum of all other numbers, or all numbers one by one?

  • GiacomoSorbi Avatar

    Kata greenlit :)

  • bkaes Avatar

    JS initial solution isn't even a function. The initial solution should at least have the correct syntax, e.g.

    function isDivisible(){
      // write your code here
    }
    
  • GiacomoSorbi Avatar

    And so I happened to stumble across this little good kata just before going to bed, to fall captivated by it, to complete it and while at it, to translate it into both Ruby and Python, still in case you may consider adding my work to your own here too :)

    I may be seeing things as I start to feel sleepy, but I think I saw a familiar kind of code for testing it all. And it was a nice reading :)

    Well, thanks for this one too :)

  • ThePendulum Avatar

    It is not very clear that the first given number is the test case. I at first assumed every n had to validate with every other n.

    It took me a glance at the examples to understand what was being asked.