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.
No problem, you're welcome.
Right, now I can see my mistake, I was thinking exactly oposite(that there is right output is 2x^2).
English is not my native language, so I misunderstanded task)
Thank you for explaining, now I get it)
That means, the derivative of x^2 should be noted as 2x^1 instead of 2x. I think you didn't get that part.
Your code returns 2x^2 instead. That's why it is invalid.
It's from description:
..."^1" should not be truncated when exponent = 2.
Yes, it will pass, but it shouldn't. If it pass it doesn't mean "it's correct".
Why is this "Best Practices" if the variable names are not clear and meaningful?
It passes, why do you say it won't? Have you tried it? Your code is wrong and it passed because random tests didn't generate a test with exponent = 2.
won't pass when exponent = 2