Ad
  • Custom User Avatar

    Dear anne123,

    After you "attempted", if you pass all tests, normally the button "Attempt" becomes "Submit" and you have to click on it.

  • Custom User Avatar

    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

  • Custom User Avatar

    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?

  • Custom User Avatar

    Very clever! I like it :-)
    Bravo!