Source Code:
(back to article)
from decimal import Decimal dezimal_zahl = Decimal('3.14159265') gerundete_zahl = dezimal_zahl.quantize(Decimal('0.00')) print(gerundete_zahl) # 3.14
Result:
Report an issue