Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
from decimal import Decimal as D
from math import ceil
eur = D(387)
rub = D(15516.52)
convert = D(0.774893452150329) / D(31.192)
converted = D(ceil(float(rub * convert)))
print eur, converted
# 387 386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment