From bf9b11f9b6d31f481089bbbc8a53c67dde0df162 Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Thu, 20 Jun 2024 16:31:06 +0300 Subject: [PATCH] show rounded number --- python/examples/numbers/float_precision_rounded.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/examples/numbers/float_precision_rounded.py b/python/examples/numbers/float_precision_rounded.py index 370e7362e..9ddb858f3 100644 --- a/python/examples/numbers/float_precision_rounded.py +++ b/python/examples/numbers/float_precision_rounded.py @@ -4,6 +4,7 @@ print(x) # 0.30000000000000004 print(y) # 0.3 +print(round(x, 10)) if round(x, 10) == round(y, 10): print("They are equal") else: