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.
Oh yes indeed, sorry for my misreading ("optional start is optional")...
Isn't that already there?
Nice kata, thanks!
However the description should state clearly that start parameter for getSerie()/get_series function is exclusive (Harshad.get_series(10,1000) does not include 1000, which is a Harshad number).
Oh, my bad. I misread
except for the start argument in getSerie() which is optional and should default to 0
as thegetSerie()
'sstart
parameter is already assigned to0
.And how is that an issue? The author may leave the initial solution completely empty for you to write everything yourself.
The
getSerie()
method in JavaScript does not havestart
parameter to 0.I had to initialize it myself to clear the tests.
Fun Kata. Curious, what are Harshad numbers used for?
Java Translation translated to Java
check the given input variables in getSerie
One is an optional agrument
I get undefined as a start value in function getSerie.
I get undefiend as a start value every test in JS
Fixed both in python and ruby
In the ::is_valid method I use an Integer instance method called digits on the number argument in order to break the number into an array of its constituent digits, and I get this error message: <NoMethodError: undefined method `digits' for 1:Fixnum>. But the Integer class is the parent of Fixnum, so the method 'digits' should be defined for the Fixnum 1. What gives? These tests pass in irb. Oh, by the way, I'm coding in Ruby.
This comment is hidden because it contains spoiler information about the solution
A few hints:
Loading more items...