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.
Dear anne123,
After you "attempted", if you pass all tests, normally the button "Attempt" becomes "Submit" and you have to click on it.
I'd be happy to.
The text you see there is written as a [comment](https://en.wikipedia.org/wiki/Comment_(computer_programming) so it just informs you and doesn't do anything. In software development there is a methodology named "Agile" which focuses on TDD (test driven development) - it's basically custom written testcases suited to the current project. The "Run Examples" section follows this concept so that the user can write their own custom testcases if they so choose so (it's optional). When creating a Kata the author has the option to either put the "Examples" full of examples testcases, or they can leave it blank and the TDD box will appear for custom written testcases.
The testing framework on Codewars is custom and so these functions are premade & preloaded already for you. They are used for creating/authoring your own Kata and each function has a different purpose - see here for information.
blah blah blah look at the link before for more info
Example
tl;dr it's for user custom tests
Indeed! Thank you very much for your answer!!!
What is happening exactly when you launch the tests through "Run Examples" or "Attempt"? I mean behind the button... How these "sections" are organized? The following text is written in the exercise but I don't really get it. Could you explain a bit?
TODO: Replace examples and use TDD development by writing your own tests
These are some of the methods available:
test.expect(boolean, [optional] message)
test.assert_equals(actual, expected, [optional] message)
test.assert_not_equals(actual, expected, [optional] message)
You can use Test.describe and Test.it to write BDD style test groupings
I'm assuming you're clicking the "Run Examples" tab which is just a section for example test cases. Click "Attempt" to go through the actual testcases which allow you to pass and submit your solution.
If I write:
def whatCentury(year):
return True (=> with the indentation of course)
Or even:
def whatCentury(year):
print(year) (=> with the indentation of course)
In Python 3.4 the output is "error" without explanation... Do you know why?
Very clever! I like it :-)
Bravo!