Numbers
Data Types
def kilogramsToGrams(kilograms): return kilograms * 1000
def kilotograms(kilograms):pass- def kilogramsToGrams(kilograms):
- return kilograms * 1000
# 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 test.assert_equals(kilogramsToGrams(1), 1000) test.assert_equals(kilogramsToGrams(1.365), 1365)
- # 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
- test.assert_equals(kilogramsToGrams(1), 1000)
- test.assert_equals(kilogramsToGrams(1.365), 1365)