decimal — Easy Playground
Arbitrary-precision decimal floating-point arithmetic
Python Playground
Output
Click "Run" to execute your codeThe decimal module is part of Python's standard library. Arbitrary-precision decimal floating-point arithmetic.
Challenge
Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?