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.
Сalculate how many years ago the father was twice as old as his son.
(or in how many years he will be twice as old).
While he has not been 60 yet, he will be in 5 years.
What a terrible instruction
WHAT?
Father 50, son 25, 5 years ago.
Umm, if the son is 30 years old, and father is 55 years old, there won't be a time when he was twice as older as his son, because he isn't older now
What do you mean? I don't even understand how this even works.
Please read this: https://docs.codewars.com/training/troubleshooting/ and mark your post as having spoiler content next time. Print the input, see why your code fails with that.
This comment is hidden because it contains spoiler information about the solution
Because strings are immutable. There is no method on a string object that modifies it in place. The method you call here just creates a new string, which is stored nowhere. Then you return the original string unmodified.
This comment is hidden because it contains spoiler information about the solution