Would you happen to have any solution for dealing with extra large numbers?
I am finding that the function gets fairly unpredictable if a number with more than 10 digits is passed.
I thought about adding a rule that would limit the user to less than 11 digits. Then the solution code would
have to include some sort of logic like:
if len(str(cents)) > 10:
cents = int(str(cents)[:10])
But that seems fairly ugly. I tried to do some research to figure out a better way to deal with it but came up
empty handed. Any advice would be greatly appreciated.
The users have to follow the design, no matter if they understand it or not.
Test cases are explicitely not using assertEquals to not show the test cases easely.
Unknown error is not thrown by any of my test cases.
Increasing the dictionary length discouraged a lot of people doing the exercise, this was already a previous change, this also encourage different solutions.
The encode method should return an empty String if a null parameter is passed. (this is taken from description)
Hi,
Description and test cases updated!
Thanks
@WWW21
!Please mark as resolved if you think these updates have fixed the kata!
Agree with all the above. For now there is too much guesswork involved in solving this kata.
I'll be working on that, thanks.
Haven't had the chance to work on this yet.
Thanks for the feedback!
Would you happen to have any solution for dealing with extra large numbers?
I am finding that the function gets fairly unpredictable if a number with more than 10 digits is passed.
I thought about adding a rule that would limit the user to less than 11 digits. Then the solution code would
have to include some sort of logic like:
But that seems fairly ugly. I tried to do some research to figure out a better way to deal with it but came up
empty handed. Any advice would be greatly appreciated.
This comment is hidden because it contains spoiler information about the solution
The users have to follow the design, no matter if they understand it or not.
Test cases are explicitely not using assertEquals to not show the test cases easely.
Unknown error is not thrown by any of my test cases.
Increasing the dictionary length discouraged a lot of people doing the exercise, this was already a previous change, this also encourage different solutions.