Is there a way to this simple equation? I'm getting as a product result : 858.2999999999999682365192655
the simple equation is this:
from decimal import Decimal
x = Decimal(57220) * Decimal(0.03)
y = x / Decimal(2)
print(y)
The expected answer should be 858.30 Also tried this but it rounds this off to 858.00
x = Decimal(57220) * Decimal(0.03)
y = x / Decimal(2)
z = round(y, 2)
print(z)
I'm really sorry I'm just a beginner here in python
BTW I'm using 3.6 version of python
Edited : I'm sorry it should be 57220 :(