Advertisement
ABIX_Edukacja

Untitled

Nov 11th, 2022
1,164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. from decimal import Decimal as D
  2. a = D("0.1")
  3. b = D("0.2")
  4. c = a + b
  5.  
  6. if c == D("0.3"):
  7.     print("OK - nasz wynik to 0.3 - oczekiwany!")
  8. else:
  9.     print(f"Nasz wynik jest dziwny: {c}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement