kyu_7.formatting_decimal_places_1 package¶
Submodules¶
kyu_7.formatting_decimal_places_1.test_two_decimal_places module¶
-
class
kyu_7.formatting_decimal_places_1.test_two_decimal_places.
TwoDecimalPlacesTestCase
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing two_decimal_places function
-
test_two_decimal_places
()[source]¶ Testing two_decimal_places function with various test inputs
Each floating-point number should be formatted that only the first two decimal places are returned.
You don’t need to check whether the input is a valid number because only valid numbers are used in the tests.
Don’t round the numbers! Just cut them after two decimal places! :return:
-
kyu_7.formatting_decimal_places_1.two_decimal_places module¶
-
kyu_7.formatting_decimal_places_1.two_decimal_places.
two_decimal_places
(number)[source]¶ Each floating-point number should be formatted that only the first two decimal places are returned.
You don’t need to check whether the input is a valid number because only valid numbers are used in the tests.
Don’t round the numbers! Just cut them after two decimal places!
- Parameters
number –
- Returns